Part Number Hot Search : 
345001 40ST1053 40ST1053 49683 345001 7812CT 20120 APT27G
Product Description
Full Text Search
 

To Download IC-TW8-13 Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  ic-tw8 16-bit sin/cos interpolator with auto-calibration rev a2, page 1/ 12 features ? input frequency of up to 125 khz ? binary/decimal interpolation factors from x0.25 to x16384 ? post-ab divider [1/1 to 1/32] allows fractional resolution ? differential sine/cosine input signal range of 20 mv to 1.4 v peak-peak ? automatic offset, gain match and phase correction ? simple automatic one-pin calibration ? easy con?guration: by static pins (for generic abz output) ? advanced con?guration: 1-wire interface, 3 and 4-wire spi (32 mhz), serial i 2 c eeprom ? pwm or abz quadrature encoder output signals ? incremental abz output to 8 mhz (32 mhz edge separation) ? position and velocity read-out (32 bit spi) ? sophisticated error handling and signal monitoring ? static 64 position lut to compensate for arbitrary sensor distortions ? supply voltage range of 3.1 v to 5.5 v ? extended temperature range of -40 to +125 c applications ? sine/cosine interpolation ? signal conditioning with auto calibration ? linear and rotary encoders ? flexible incremental encoder systems packages qfn48 7x7 block diagram copyright ? 2013 ic-haus http://www.ichaus.com p r e l i m i n a r y p r e l i m i n a r y sin- adc fault + status frame clock calib cos- cos+ outb vc vref xin xout zero+ zero- xrst adc outa outz sda scl wp eesel c1 c0 c2 c3 spi_sclk spi_xss spi_si spi_so dvdd avdd fab avss dvss ir config. ic-tw8 control spi pin interface pwm interface 1-wire master eeprom quadrature generator signal driver crystal bandgap reset memory digital processing sin+ _ + _ + _ pinsel
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev a2, page 2/ 12 description the ic-tw8 is a 16-bit application-speci?c dsp inter- polator for sine/cosine signals with automatic calibra- tion and adaption of signal path parameters during operation to maintain minimum angular error and jit- ter. angular position is calculated at a programmable resolution of up to 65,536 increments per input cy- cle. automatic calibration and adaption (correction during operation) of sensor offset, sin/cos amplitude match, and phase quadrature is provided. addition- ally, a 64-byte lookup table (lut) is available to cor- rect for residual harmonic distortion in the sensor sig- nals. the ic-tw8 accepts 10 mv to 700 mv differential sin/cos input signals directly from magnetic or op- tical sensors C no external signal conditioning is re- quired in most applications. the differential zero (ref- erence) input accepts a wide range of digital and ana- log index gating sources such as hall or mr sen- sor bridges. the z output width, position relative to the sin/cos inputs, and synchronization to the ab quadrature outputs is fully programmable. in addition to industry-standard incremental abz quadrature output, the ic-tw8 provides optional pwm (potentiometer) and serial-only (spi or 1-wire) output modes for special or imbedded applications. the incremental abz quadrature output can be gen- erated at a frequency of up to 8 mhz (31 ns edge spacing); the maximum output frequency can also be limited so as not to overwhelm connected counters. in pwm output mode, the ic-tw8 provides a differ- ential pulse-width modulated signal proportional to the calculated angle (position) of the sin/cos inputs. an rc ?lter may be used to provide an analog volt- age output for potentiometer applications, or to drive an external adc for simple single-turn absolute ap- plications. synchronous digital ?lters may be imple- mented using an external microcontroller or fpga for more sophisticated or imbedded applications. in serial-only output mode, the ic-tw8s internal 32- bit position counter and instantaneous angular veloc- ity register can be read via the built-in spi or 1-wire serial ports at clock rates of up to 32 mhz. higher in- put signal frequencies are allowed in serial-only out- put mode since the abz output frequency limitation is not applicable. the ic-tw8 offers two con?guration modes. pin con?guration mode provides simple, static con?gura- tion that does not require any programming or com- plicated calibration. pin con?guration mode uses a subset of the ic-tw8s complete capabilities includ- ing abz quadrature output, a limited choice of the most commonly used interpolation (resolution) and hysteresis values, and one-button calibration. eight resistors set voltage levels at four con?guration input pins to select all operating parameters, simplifying product assembly. one-button auto calibration sets input gain and compensates sensor offset and sin/- cos channel gain match and phase with just a few input cycles and then stores the compensation val- ues to eeprom. in more sophisticated applications, serial con?g- uration mode allows access to all ic-tw8 fea- tures. complete device con?guration using the bi- directional spi or 1-wire serial ports provides ac- cess to all resolutions (including fractional interpola- tion), the sensor distortion lut, fully programmable hysteresis, and advanced noise/jitter ?ltering, quality monitoring, and fault detection capabilities. the ic-tw8 requires only two external components for operation, a serial eeprom for storage of con- ?guration and calibration data, and a clock oscillator or crystal. an internal rc oscillator is provided for cost-sensitive applications. split analog and digital power supply inputs allow optimal ?ltering for noisy industrial environments. an integrated power-on re- set circuit can be overridden by an external hardware reset signal if necessary. p r e l i m i n a r y p r e l i m i n a r y
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev a2, page 3/ 12 contents packaging information 4 pin configuration qfn48-7x7 (topview) . . . . . . . . . . . . . . . . . 4 pin functions . . . . . . . . . . . . . . . 4 absolute maximum ratings 7 thermal data 7 electrical characteristics 8 operating requirements: spi/1-wire in- terface 10 additional information 11 design review: function notes 11 revision history . . . . . . . . . . . . . 11 attachments 13 pc: description of pin con?guration mode . 13 sc: description of serial con?guration mode 28 p r e l i m i n a r y p r e l i m i n a r y
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev a2, page 4/ 12 packaging information pin configuration qfn48-7x7 (topview) pin functions no. name function 38 avdd +3.1 v to 5.5 v analog supply voltage avdd and dvdd can be powered either mutually or separately but must be the same voltage. 46 avss analog ground avss must be connected to dvss ex- ternally. 21 dvdd +3.1 v to 5.5 v digital supply voltage 15 dvss digital ground tp connect the backside paddle to a ground plane which must have avss potential. ... other refer to the following table for a detailed description. pin functions no. name i/o function description 1 nc pin has no connection to die. connect to dvss on pcb. 2 xrst digital in, low active, 40 k
pull-up reset input the device is held in reset as long as xrst is low. for operation at 5 v, connect 68 k
to dvss (changes the power-on- reset threshold to approx. 4 v). refer to section power-on-reset and startup for more information on reset. 3 fab digital in, 5 k
pull-down test enable input fabrication test is enabled when pin is high during reset. this pin must be connected to dvss for normal operation. 4 eesel digital in, 150 k
pull-down selection input pin must be tied low. 5 calib digital in, 10 k
pull-up, hysteresis calibration control device enters calibration mode on falling edge of calib. adaptation parameters are written to the external eeprom on rising edge of calib. this pin should be left ?oating or connected to dvdd if not used. 6 clock digital in/out, 150 k
pull-down clock output the pin is a programmable clock output that can be used for pwm synchronization. a connection to dvss is advisable when not in use. 7 ir digital in/out, 150 k
pull-up 1-wire interface i/o pin is bi-directional. refer to programmers reference for more details. 8 frame digital in/out, 150 k
pull-down sync output this pin outputs the internal adc sampling clock, which can be used to synchronize downstream circuits. a connection to dvss is advisable when not in use. 9 spi_so digital out spi slave output pin directly connects to an spi master mi pin. 10 spi_si digital in spi slave input pin directly connects to spi master mo pin. this pin should be tied to dvss if the spi is not used. p r e l i m i n a r y p r e l i m i n a r y
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev a2, page 5/ 12 pin functions no. name i/o function description 11 spi_sclk digital in, with hysteresis spi slave clock input pin connects to spi master clock output. the input implements hys- teresis to avoid double triggering. this pin must be tied to dvss if the spi is not used. 12 nc these pins have no connection to die. connect to dvss on pcb. 13 nc 14 spi_xss digital in, low active spi slave select input in 4-pin spi mode this pin directly connects to the spi master slave select output. in case the spi is operated in 3-pin mode, spi_xss must be tied low to dvss. 15 dvss ground digital ground pin must tie to high quality ground, usually a solid pcb plane. 16 outz digital out z output quadrature interface reference output. 17 outb digital out b output pwm- output z window in quadrature mode this is output b. in pwm mode this is pwm-, the inverted output of outa. in z calibration mode (bit rb_test1.z_test = 1) this is the z window seen just after the input comparator. 18 outa digital out a output pwm+ output z window in quadrature mode this is output a. in pwm mode this is pwm+. in z calibration mode (bit rb_test1.z_test = 1) this is the z window used to gate the z output. 19 status digital out pwm status output this pin provides proportional status information. pin can drive a 10 ma led and is widely con?gurable. refer to section monitoring interpolation quality for details. 20 fault digital out error status output pin is low on error and is capable of driving a 10 ma led. the error response can be con?gured as detailed in section fault handling for details. 21 dvdd supply digital power supply +3.1 v to +5.5 v supply voltage terminal. dvdd and avdd must be the same voltage level (5 v or 3.3 v). 22 pinsel digital in, 150 k
pull-down con?guration mode selection tie pin to dvss to enable serial con?guration mode. tie pin to dvdd to select pin con?guration mode. 23 nc these pins have no connection to die. connect to dvss on pcb. 24 nc 25 nc 26 reserved connect this pin to dvss on pcb. 27 scl digital in/out, 10 k
pull-up eeprom clock line this pin connects to the eeprom scl pin. no external i2c pull-up resistor is required as 10 k
is integrated. 28 sda digital in/out, 10 k
pull-up eeprom data line this pin connects to the eeprom sda pin. no external i2c pull-up resistor is required as 10 k
is integrated. 29 wp digital out eeprom write protection this pin acts as the write protect signal and connects to the eeprom wp pin. no external pull-up is required as this pin is a push-pull output actively driving low and high. 30 c0 analog in con?guration inputs if the pin con?guration mode is used (pin pinsel tied high), each pin functions as 12-level con?guration input. if serial con?guration mode is used (pin pinsel tied low), connect these pins to dvss on pcb. 31 c1 32 c2 33 c3 34 xout analog in/out crystal terminal pin can be left ?oating if no crystal is used. an external oscillator or other square wave clock source can be used to drive this pin. refer to providing a clock. 35 xin analog in crystal terminal pin must be tied to avss if no crystal is used. 36 nc these pins have no connection to die. connect to dvss on pcb. 37 nc 38 avdd supply analog power supply +3.1 v to +5.5 v supply voltage terminal. keep it clean! dvdd and avdd must be the same voltage level (5 v or 3.3 v). 39 sin+ analog in sine input + differential sine signal input. for single ended sensors sin- must be biased to an appropriate dc level. 40 sin- analog in sine input - 41 cos+ analog in cosine input + differential cosine signal input. for single ended sensors cos- must be biased to an appropriate dc level. 42 cos- analog in cosine input - 43 nc pin has no connection to die. connect to dvss on pcb. 44 vc analog out bias output decouple with 1 f capacitor to avss. do not inject noise into this pins as it directly impacts adc conversion noise. p r e l i m i n a r y p r e l i m i n a r y
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev a2, page 6/ 12 pin functions no. name i/o function description 45 vref analog out bias output decouple with 1 f capacitor to avss. do not inject noise into this pin as it directly impacts adc conversion noise. 46 avss ground analog ground pin must be tied to high quality ground, usually a solid pcb plane. 47 zero+ analog in zero input + differential zero gating input. if single ended signal sources are used, the unused terminal (either zero+ or zero-) must be tied to an appropriate dc bias. 48 zero- analog in zero input - p r e l i m i n a r y p r e l i m i n a r y
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev a2, page 7/ 12 absolute maximum ratings these ratings do not imply operating conditions; functional operation is not guaranteed. beyond these values damage may occur. item symbol parameter conditions unit no. min. max. g001 dvdd, avdd voltage at dvdd, avdd referenced to avss -0.3 6 v g002 dvdd difference voltage between dvdd and avdd -0.3 +0.3 v g003 dvss difference voltage between dvss and avss -0.3 +0.3 v g004 vpin pin voltage at any pin versus avss referenced to avss -0.3 avdd + 0.5 v g005 ipin input current at any pin, except avdd, avss, dvdd, dvss -10 10 ma g006 vesd1 esd susceptibility of signal input pins hbm, 100 pf discharged through 1.5k
; pins sin+, sin-, cos+, cos-, zero+, zero- g007 vesd2 esd susceptibility of remaining pins hbm, 100 pf discharged through 1.5k
g008 tj junction temperature -40 150 c g009 ts storage temperature -40 150 c thermal data item symbol parameter conditions unit no. min. typ. max. t01 ta operating ambient temperature range -40 125 c t02 rthja thermal resistance chip to ambient qfn48 surface mounted to pcb according to jedec 51 30 k/w all voltages are referenced to pin avss unless otherwise stated. all currents ?owing into the device pins are positive; all currents ?owing out of the device pins are negative. p r e l i m i n a r y p r e l i m i n a r y
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev a2, page 8/ 12 electrical characteristics operating conditions: avdd = dvdd = 3.1...5.5 v, tj = -40...+125 c, reference point avss unless otherwise stated item symbol parameter conditions unit no. min. typ. max. total device 001 avdd, dvdd permissable supply voltage avdd, dvdd 3.1 5.5 v 002 idd total supply current in avdd and dvdd ?n = 1 khz, increments 4096, post-ab divider 1, error-free boot-up from eeprom; vdd = 5 v, 32 mhz crystal 25 ma vdd = 3.3 v, 20 mhz crystal 12 ma signal inputs and ampli?ers: sin+, sin-, cos+, cos- 101 vin() permissible input voltage 1.4 avdd - 1.0 v 102 vos() ampli?er input offset voltage 12 mv 103 iin() input leakage current 50 na 105 offcorr correctable input offset voltage as percentage of input signal amplitude; input offset voltage is the sum of sensor offset plus ampli?er offset (item 102); 100 % 106 acorr correctable sin/cos amplitude mismatch max(asin, acos) / min(asin, acos), whereas asin and acos are the sin/cos input ampli- tudes respectively. 1.24 107 phicorr correctable sin/cos phase error (step size 0.052 degree) 53 deg 108 rpu() pull-up resistor at sin+, cos+ main_cfg.pull = 1 2 m
109 rpd() pull-down resistor at sin-, cos- main_cfg.pull = 1 2 m
index signal inputs and ampli?er: zero+, zero- 201 vin() permissible input voltage 0 avdd v 202 vos() input referred offset voltage 12 mv 203 iin() input leakage current 50 na converter performance 301 inl integral nonlinearity refer to figure 2 , 1 vpp-diff sin/cos input with compensated offset, gain and phase 0.08 deg 302 dnl differential nonlinearity refer to figure 2 , 1 vpp-diff sin/cos input with compensated offset, gain and phase 0.02 deg 303 n output angle noise 1 vpp-diff sin/cos input, ?n = 0 hz 0.08 deg clock: xin, xout 401 fxtl permissible external frequency driven into xout avdd, dvdd = 5 v 6 32 mhz avdd, dvdd = 3.3 v 6 24 mhz 402 fosc internal oscillator frequency tj = 27 c, main_clock.freq = 0; avdd, dvdd = 3.3 v 16 mhz avdd, dvdd = 5 v 20 mhz reset and start-up: xrst 601 dvddon dvdd reset threshold increasing voltage at dvdd; xrst tied to dvdd 2.7 v xrst connected through 68 k
to dvss 4.0 v 602 vt()hi input logic threshold high 2.2 v 603 vt()lo input logic threshold low 0.8 v 604 rpu() pull-up resistor v() = 0 ... dvdd - 1 v 40 k
605 tstart startup time avdd, dvdd = 5 v, fxtl = 24 mhz by crystal; pin con?guration (eeprom connected) 100 ms ready for serial con?g. (eeprom connected) 100 ms ready for serial con?g. (no eeprom) tbd. ms p r e l i m i n a r y p r e l i m i n a r y
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev a2, page 9/ 12 electrical characteristics operating conditions: avdd = dvdd = 3.1...5.5 v, tj = -40...+125 c, reference point avss unless otherwise stated item symbol parameter conditions unit no. min. typ. max. digital input pins: eesel, calib, clock, ir, frame, spi_si, spi_sclk, spi_xss, pinsel, scl, sda, c0, c1, c2, c3, fab 701 vt()hi input logic threshold high dvdd = 5 v 2.2 v dvdd = 3.3 v 2.2 v 702 vt()lo input logic threshold low dvdd = 5 v 0.8 v dvdd = 3.3 v 0.8 v 703 vhys() input hysteresis at calib, spi_sclk 0.15 0.75 %dvdd 704 ilk() input leakage current at spi_si, spi_sclk, spi_xss 50 na 705 rpu() pull-up resistor at ir 150 k
706 rpu() pull-up resistor at calib, scl, sda 10 k
707 rpd() pull-down resistor at eesel, clock, frame, pinsel 150 k
708 rpd() pull-down resistor at fab 5 k
digital output pins: clock, frame, spi_so, outa, outb, outz, status, fault, sda, wp 801 vs()hi output voltage high dvdd = 5 v, iout = 4 ma 4.5 v dvdd = 3.3 v, iout = 4 ma 2.8 v 802 vs()lo output voltage low dvdd = 5 v, iout = -4 ma 0.3 mv dvdd = 3.3 v, iout = -4 ma 0.3 mv 803 idc()max permissible output dc load per pin 10 ma 804 idcmax permissible total output dc load for all output pins in aggregate 60 ma 805 tr() rise time dvdd = 5 v, cl = 50 pf 50 ns dvdd = 3.3 v, cl = 50 pf 30 ns 806 tf() fall time dvdd = 5 v, cl = 50 pf 50 ns dvdd = 3.3 v, cl = 50 pf 30 ns bias outputs: vc, vref 901 vc bias voltage at vc i(vref) = 0 50 %vdd 902 dvref bias voltage at vref versus vc dvref = v(vref) - v(vc); vc i(vref) = 0 -1 v figure 1: description of ab output signals. figure 2: de?nition of integral and differential nonlin- earity. p r e l i m i n a r y p r e l i m i n a r y a b t ab t mtd t whi t aarel aarel 0 360 180 converter error inl : the maximum absolute error . dnl : the maximum step between two consecutive samples . ideal converter actual converter angular position
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev a2, page 10/ 12 operating requirements: spi/1-wire interface operating conditions: avdd = dvdd = +3.1 ... +5.5 v, avss = dvss = 0 v, tj = -40...125 c item symbol parameter conditions unit no. min. max. spi interface timing i001 txss_set setup time: spi_xss hi ! lo before spi_sclk lo ! hi 15 ns i002 txss_hold hold time: spi_xss lo after spi_sclk lo ! hi 25 ns i003 txss_hi spi_xss signal duration hi 15 ns i004 tsi_set setup time: spi_si stable before spi_sclk lo ! hi 5 ns i005 tsi_hold hold time: spi_si stable after spi_sclk lo ! hi 10 ns i006 f(sclk) spi_sclk clock frequency 24 mhz i007 tc_hi spi_sclk signal duration hi 10 ns i008 tc_lo spi_sclk signal duration lo 10 ns i009 tso_p propagation delay: spi_so stable after spi_sck hi ! lo 15 ns i010 tso_p2 propagation delay: spi_so high impedance after spi_xss lo ! hi 15 ns figure 3: spi write timing. figure 4: spi read timing. p r e l i m i n a r y p r e l i m i n a r y s p i _ s c l k s p i _ xs s l s b o u t s p i _ s o t c _ h i t c _ lo t xs s _ h o ld t s o _ p t s o _ p 2 t s o _ p m s b o u t s p i _ s c l k s p i _ s i s p i _ xs s t r is t a t e l s b in s p i _ s o t c _ h i t c _ lo t xs s _ h o ld t s i _ h o ld t s i _ s e t t xs s _ s e t t xs s _ h i t xs s _ h i m s b in s p i _ s i d o n ?t c a r e in p u t in p u t in p u t o u t p u t in p u t in p u t in p u t o u t p u t s p i _ s c l k s p i _ xs s l s b o u t s p i _ s o t c _ h i t c _ lo t xs s _ h o ld t s o _ p t s o _ p 2 t s o _ p m s b o u t s p i _ s c l k s p i _ s i s p i _ xs s t r is t a t e l s b in s p i _ s o t c _ h i t c _ lo t xs s _ h o ld t s i _ h o ld t s i _ s e t t xs s _ s e t t xs s _ h i t xs s _ h i m s b in s p i _ s i d o n ?t c a r e in p u t in p u t in p u t o u t p u t in p u t in p u t in p u t o u t p u t
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev a2, page 11/ 12 additional information documentation ? ic-tw8 scm: serial con?guration manual ? ic-tw8 pcm: pin con?guration manual ? ic-tw8 pr: programmers reference ? ic-tw8 eval tw8_1d: evaluation board description design tools ? ic-tw8 redt: rotary encoder design tool (excel spreadsheet) application notes ? under preparation; please contact ic-haus. design review: function notes ic-tw8 c1 no. function, parameter/code description and application notes 1 adpt_cfg.lut the distortion look-up table is not featured by chip release c1; mandatory programming: adpt_cfg.lut = 0 table 6: notes on chip functions regarding ic-tw8 chip release c1. ic-tw8 d1, d2, d3 no. function, parameter/code description and application notes none at time of printing. table 7: notes on chip functions regarding ic-tw8 chip releases d1, d2, d3 revision history rel rel.date chapter modi?cation page a1 tbd all chapters and attachments initial release all ic-haus expressly reserves the right to change its products and/or speci?cations. an info letter gives details as to any amendments and additions made to the relevant current speci?cations on our internet website www.ichaus.de/infoletter ; this letter is generated automatically and shall be sent to registered users by email. copying C even as an excerpt C is only permitted with ic-haus approval in writing and precise reference to source. ic-haus does not warrant the accuracy, completeness or timeliness of the speci?cation and does not assume liability for any errors or omissions in these materials. the data speci?ed is intended solely for the purpose of product description. no representations or warranties, either express or implied, of merchantability, ?tness for a particular purpose or of any other nature are made hereunder with respect to information/speci?cation or the products to which information refers and no guarantee with respect to compliance to the intended use is given. in particular, this also applies to the stated possible applications or areas of applications of the product. ic-haus conveys no patent, copyright, mask work right or other trade mark right to this product. ic-haus assumes no liability for any patent and/or other trade mark rights of a third party resulting from processing or handling of the product and/or any other use of the product. p r e l i m i n a r y p r e l i m i n a r y
ic-tw8 16-bit sin/cos interpolator with auto-calibration rev a2, page 12/ 12 ordering information type package options order designation ic-tw8 qfn48, 7 mm x 7 mm ic-tw8 qfn48 evaluation board pcb, 100 mm x 80 mm ic-tw8 eval tw8_1d pc-usb adapter (required to connect the evaluation board to the pc) ic-mb3 icsy mb3u-i2c ic-tw8 gui user software for windows pc (entry of ic parameters, ?le storage, and transfer to dut) download at www.ichaus.com/tw8 encoder design tool excel-based rotary encoder design tool for parameter de?nition. download at www.ichaus.com/tw8 for technical support, information about prices and terms of delivery please contact: ic-haus gmbh tel.: +49 (61 35) 92 92-0 am kuemmerling 18 fax: +49 (61 35) 92 92-192 d-55294 bodenheim web: http://www.ichaus.com germany e-mail: sales@ichaus.com appointed local distributors: http://www.ichaus.com/sales_partners p r e l i m i n a r y p r e l i m i n a r y
ic-tw8 16-bit sin/cos interpolator pin configuration mode jan 9, 2013 page pc1/15 copyright ? 2011?2013 ic-haus www.ichaus.com preliminar y preliminary table of contents about this document .............................................................................................................................. ....... 2 functional overview .............................................................................................................................. ......... 2 electrical connections .............................................................................................................................. ...... 3 connecting the incremental sensor ............................................................................................. ................. 4 connecting an index sensor (if used) .......................................................................................... ................ 5 connecting the eeprom ......................................................................................................... .................... 5 power-on-reset ................................................................................................................ ............................. 6 providing a clock ............................................................................................................. ............................. 6 connecting the abz outputs .................................................................................................... .................... 7 power-up sequence .............................................................................................................................. ........... 7 pin configuration .............................................................................................................................. .............. 8 setting the interpolation factor .............................................................................................. ....................... 9 setting the auto-adaption mode ................................................................................................ .................. 9 setting the filter mode and hysteresis ........................................................................................ ............... 10 setting the maximum ab freque ncy and lag recovery ........................................................................... 1 1 serial interfaces .............................................................................................................................. ............... 11 auto calibration .............................................................................................................................. .............. 12 ic-tw8 rotary encoder design tool ......................................................................................................... 12 pin configuration reference ........................................................................................................................ 14 revision history .............................................................................................................................. .............. 15
ic-tw8 16-bit sin/cos interpolator pin configuration mode jan 9, 2013 page pc2/15 copyright ? 2011?2013 ic-haus www.ichaus.com preliminar y preliminary about this document this document describes the pin configuration mode of the ic-tw8 interpolator. pin-configuration mode provides simple, static configuration of the device without any programming or complicated calibra- tion. pin configuration allows selection of only the most commonly used features of the device. access to all features of the ic-tw8 is available in serial config- uration mode, described in a separate document. design tools for both rotary and linear encoders us- ing the ic-tw8 are available. these tools are in the form of excel spreadsheet s that allow entering ap- plication parameters in engineering units and then provide performance limits and graphs, configura- tion resistor values, and jumper settings for use with the ic-tw8 tw8_1d demonstration board. this greatly simplifies and speeds up the design process of encoders using the ic-tw8. functional overview the ic-tw8 is a general-purpose 16-bit sin/cos interpolator with sophisticated auto-calibration functions. it accepts 20mv to 1.4v peak-to-peak differential analog input signals from magnetic or optical sensors and calculates (interpolates) the an- gular position. output is industry-standard incre- mental ab quadrature at programmable resolution. simple pin configuration and one-step automatic calibration requires no complicated signal analysis or calibration procedure during product design or production. in addition to the chosen sensor, the ic-tw8 re- quires an external eeprom to store its configura- tion and calibration data. an external crystal can be used instead of the internal oscillator of the ic-tw8 for superior frequency stability. a differential line driver can be connected directly to the ic-tw8 quadrature outputs to make a complete encoder. figure 1: ic-tw8 functional overview outa outb outz zero cos sin interpolation factor of x5 shown index pulse is suppressed as zer o is low.
ic-tw8 16-bit sin/cos interpolator pin configuration mode jan 9, 2013 page pc3/15 copyright ? 2011?2013 ic-haus www.ichaus.com preliminar y preliminary electrical connections the basic electrical connections for an encoder us- ing the ic-tw8 are shown in figure 2. other than the analog sensor, only an eeprom for parameter storage, eight configuration resistors, and a few by- pass capacitors are required for operation. pinsel (pin 22) must be connected to dvdd to select pin configuration mode. a voltage regulator to supply clean power to the device and a line driver are rec- ommended. an crystal or oscillator (clock driver) is also recommended. the ic-tw8 requires a high quality ground and clean power supplies. analog ground (avss = pin 46) and digital ground (dvss = pin 15) must both be connected on the pcb to a solid ground plane. analog power (avdd = pin 38) and digital power (dvdd = pin 21) inputs must be connected to a low impedance 5v or 3.3v power source, preferably an on-board voltage regulator. in addition, avdd and dvdd should each have a dedicated 1f decou- pling capacitor placed as close to the power pins on the device as possible. if the ic-tw8 is used with a line driver (such as the ic-hd7 or ic-hx ) or a high frequency fpga, it is especially important to isolate the ic-tw8 power inputs (avdd and dvdd) against external noise. in such applications, a dual voltage regulator such as the ic-dc is highly recommended. note that both avdd and dvdd must be the same voltage level (5v or 3.3v). figure 2: ic-tw8 electrical connections (pin configuration mode) both pin vc (pin 44) and vref (pin 45) must be decoupled to ground with 1f each as shown. the eeprom and the line driver (if used) must be de- coupled according to their respective requirements. the calibration button provides an easy means to activate the auto-calibration feature of the ic-tw8 to set the data path parameters (offset, gain, and phase) to their optimal values. all pins not explicitly shown in figure 2 should be connected to appropri- ate levels as indicated under pin functions in the ic- tw8 data sheet. vref vc 1f 1f 1f avdd avss vdd_tw8 1f dvdd eesel vdd_tw8 sin+ sin? cos+ cos? 10f vdd_tw8 vdd_main outa outb outz regulator line driver mr sensor ic-tw8 scl sda scl sda eeprom 24aa02 vdd_tw8 c0 c1 c2 c3 8 configuration resistors calib calibration button pinsel dvss pinsel tied to dvdd for pin configuration mode eesel tied to dvss.
ic-tw8 16-bit sin/cos interpolator pin configuration mode jan 9, 2013 page pc4/15 copyright ? 2011?2013 ic-haus www.ichaus.com preliminar y preliminary connecting the incremental sensor the ic-tw8 connects directly to magnetic (such as the ic-sm2l or ic-sm5l ) or optical sensors providing differential sin/cos outputs as shown in figure 3. signal amplitude (a) from all four sen- sor channels must be in the range of 5 ? 350mv as shown in figure 4 for proper operation with the ic-tw8. figure 3: differential sensor connection figure 4: differential sensor signal inputs single-ended sin/cos inputs can also be connected to the ic-tw8 by connecting the sin? and cos? pins to the proper bias voltage as shown in figure 5. since the ic-tw8 provides high-impedance signal inputs, a simple resistive voltage divider can be used to gener- ate the required bias voltage. for amr sensors, it is recommended that the resistors of the bias generator match the amr sensor bridge resistance to improve power supply noise rejection. no decoupling capacitor should be used. figure 5: single-ended sensor connection differential inputs should be used whenever possible to reject common mode distortions and provide in- creased signal amplitude and improved signal to noise ratio (snr). regardless of input configuration, the auto-calibration feature of the ic-tw8 is sufficient in most cases to compensate for any signal offset, gain, and phase dis- tortions without requiring any additional external components. sensor bridge 0 sensor bridge 1 sin+ sin- cos+ cos- ic-tw8 vdd 0 (vdd/2) sin+ sin- a ?a 5mv a 350mv 0 180 360 sensor bridge 0 sensor bridge 1 sin+ sin- cos+ cos- ic-tw8 avdd resistive bias genera t o r
ic-tw8 16-bit sin/cos interpolator pin configuration mode jan 9, 2013 page pc5/15 copyright ? 2011?2013 ic-haus www.ichaus.com preliminar y preliminary connecting an index sensor (if used) the ic-tw8 can interface to a wide range of in- dex sensors or gating sources to provide an index or z output which is synchronized with the ab outputs. digital hall sensors are often used for this purpose, as shown in figure 6. figure 6: index sensor connection digital sensors (hall, mr, and others) typically provide an active-low signal via an open-drain output that pulls low in the presence of a magnetic field. connect an active-low (open drain) digital index sensor to the ic-tw8 zero? input (pin 48) and connect the zero+ input (pin 47) to a resis- tive voltage divider set to the midpoint of the in- dex sensor output voltage swing to provide good noise rejection. for active-high (open source) dig- ital index sensors, reverse the zero+ and zero? connections. to guarantee one and only one z output from the ic-tw8 over multiple sin/cos input cycles, the zero input signal must be roughly centered on (in phase with) the cos+ incremental sensor sig- nal and no larger than 1.5 sin/cos input cycles under all conditions. if no index (z) output is required, connect zero+ (pin 47) to ground and zero? (pin 48) to avdd. analog-output index sensors can also be used with the ic-tw8, but only in spi/1-wire configu- ration mode. connecting the eeprom the ic-tw8 requires a 24xx02 through 24xx16 fami- ly i 2 c eeprom for storage of sensor calibration data (offset, gain, etc.). the eeprom connects directly to the ic-tw8 via a dedicated i 2 c communication chan- nel using scl (pin 27) and sda (pin 28) as shown in figure 7. no external pull-up resistors are required. eesel (pin 4) of the tw8 must also be connected to dvss as shown. figure 7: eeprom connection in pin configuration mode, the write protect (wp) input of the eeprom is not controlled by the ic- tw8. wp must be grounded (disabled) during config- uration to allow the ic-tw8 to write the auto-adapted parameters to the eeprom. in operation, wp can be left grounded (write protection disabled) as shown in figure 7, or connected to dvdd by additional circuit- ry (such as a jumper) for parameter protection. zero+ zero- v dd ic-tw8 digital hall active low v dd sda wp 1f dvdd dvss vdd sda wp eeprom 24xx ic-tw8 scl scl 1f vdd vcc vss eesel eesel tied to dvss.
ic-tw8 16-bit sin/cos interpolator pin configuration mode jan 9, 2013 page pc6/15 copyright ? 2011?2013 ic-haus www.ichaus.com preliminar y preliminary power-on-reset the ic-tw8 contains a built-in power-on-reset (por) circuit that controls the safe start-up of the device. the internal por can be configured for two thresholds, 2.7v for use with 3.3v supplies or 4v, which is recommended when operating the ic-tw8 at 5v. connect xrst (pin 2) dvdd or leave it unconnected (xrst has an internal 40k ? pullup resistor to dvdd) to select a power-on- reset threshold of 2.7v. connect xrst to ground through a 68k ? resistor to select a threshold of 4v. an external reset source (such as an rc circuit) can also be connected to xrst (pin 2) to directly control the por behavior. figure 8: setting the power-on-reset threshold providing a clock the ic-tw8 supports three clocking modes as indicated in figure 9. while the ic-tw8 provides an internal oscillator, it cannot be tuned in pin configuration mode. thus, an external crystal or other clock source is re commended for all but the most cost-sensitive applications. figure 9: clocking an external crystal or oscillator provides the most stable clock signal over time and temperature varia- tions, resulting in the most consistent long-term ic- tw8 performance. connect an external crystal to xin (pin 35) and xout (pin 34) as shown in fig- ure 9. depending on the crystal characteristics, two capacitors to ground might be necessary for stable oscillation. to use an oscillator or ceramic resona- tor, connect xin (pin 35) to ground and the oscilla- tor output to xout (pin 34) as shown in figure 9. maximum crystal frequency ( f clock ) is 32 mhz with 5v supplies and 24 mhz with 3.3v supplies. mini- mum frequency is 6 mhz regardless of supply volt- age. to use the internal oscillato r, connect both xin (pin 35) and xout (pin 34) to ground as shown in fig- ure 9. the ic-tw8?s internal oscillator has a nomi- nal frequency of 20 mhz with 5v supplies and 16 mhz with 3.3v supplies. however, manufacturing tolerances and changes in temperature can cause large variations in the frequency of the internal os- cillator. dvdd ic-tw8 xrst connect xrst to dvdd (or leave floating) for 2.7v por threshold. ic-tw8 xrst connect xrst to dvss via 68k ? resistor for 4v por threshold. 68k ? dvss xout xin ic-tw8 xout xin ic-tw8 xout xin ic-tw8 crystal clock inject internal oscillator
ic-tw8 16-bit sin/cos interpolator pin configuration mode jan 9, 2013 page pc7/15 copyright ? 2011?2013 ic-haus www.ichaus.com preliminar y preliminary connecting the abz outputs in pin configuration mode, the ic-tw8 provides industry-standard quadrature incremental outputs at outa (pin 18) and outb (pin 17). if an index sensor is connected to the zero inputs of the ic- tw8, a z output synchronous with the ab out- puts is also available on outz (pin 16). these outputs can be directly connected to an encoder counter such as the ic-tw9 . alternatively, the abz outputs can be connected to a differential line driver (such as the ic-hd7 or ic-hx ) as shown in figure 10. when using a line driver it is especially important to isolate the ic- tw8 from external switching noise using a regu- lator, as shown. figure 10: line driver connection power-up sequence after power-up, the ic-tw8?s por circuit monitors the supply voltage and waits until it has reached the appropriate threshold (as determined by the xrst connections). the ic-tw8 then starts up using the internal oscillator (even if a crystal or external clock source is connected) and executes its start-up cycle as outlined below. 1. read parameter values from eeprom. 2. set proper clock source and frequency. 3. read configuration inputs and enable signal path. 4. wait for all analog circuitry to settle. 5. clear all faults. 6. start abz output generation. if any faults are detected during the start-up cycle, the ic-tw8 does not enable the ab outputs but goes into an idle state with the fault output (pin 20) asserted (low). the amount of time the ic-tw8 waits for the analog circuitry to settle ( twait ) depends on the clock fre- quency as shown by the formula below. twait [ms] ? 1048 fclock [mhz] for example, using a 32 mhz crystal, the ic-tw8 waits 33 ms for the analog circuitry to settle. outa outb outz line driver ic-tw8 e1 a1 a2 e3 e5 a3 a4 a5 a6 ic-hx 5v 3.3v vb1 vb2 vb3 vcc avdd dvdd 24v regulator regulator gndx avss/dvss
ic-tw8 16-bit sin/cos interpolator pin configuration mode jan 9, 2013 page pc8/15 copyright ? 2011?2013 ic haus www.ichaus.com preliminar y preliminary pin configuration in pin configuration mode, the ic-tw8 is config- ured by applying different voltages to configura- tion inputs c0, c1, c2, and c3 (pins 30, 31, 32, and 33 respectively). each configuration input rec- ognizes 12 different voltage levels which together select one of 12 4 = 20,736 separate operational configurations for the device. the desired voltage levels are typically set using a resistive voltage divider on each of the configura- tion inputs as shown in figure 11. thus, only 8 resistors are required to completely configure the ic-tw8. figure 11: pin configuration resistors the resistors should be located as close to the con- figuration input pins as possible and no decoupling capacitors should be used. table 1 shows the recommended resistor values for setting the configuration levels. the resistors must be 1% (or better) tolerance to guarantee reliable operation under all conditions. configuration level divider ratio rx1 [k ? ] rx2 [k ? ] 11 0.87 0.00 10 0.80 3.01 12.1 9 0.73 4.02 11.0 8 0.67 4.99 10.0 7 0.60 6.04 9.09 6 0.54 6.98 8.06 5 0.46 8.06 6.98 4 0.40 9.09 6.04 3 0.33 10.0 4.99 2 0.27 11.0 4.02 1 0.20 12.1 3.01 0 0.13 0.00 table 1: pin configuration resistor values an open circuit is shown as infinite ( ) resistance and a short circuit is shown as zero resistance in table 1. c0 v dd c1 ic-tw8 v dd r01 r02 r11 r12 do not use decoupling caps! 1% resistors as close to ic-tw8 confi g uration p ins as p ossible. c2 r21 r22 c3 r31 r32 v dd v dd avdd
ic-tw8 16-bit sin/cos interpolator pin configuration mode jan 9, 2013 page pc9/15 copyright ? 2011?2013 ic haus www.ichaus.com preliminar y preliminary setting the interpolation factor configuration inputs c0 and c1 are used to select the interpolation factor. input c1 selects the desired interpolation group i0, i1, or i2 and input c0 selects the desired interpolation factor from within the se- lected group. choose the desired interpolation factor from table 2 and connect the appropriate resistors to configuration input c0 (pin 30) according to ta- ble 1 to set the corresponding configuration level. c0 level interp. grou p i0 interp. grou p i1 interp. grou p i2 11 x8192 1 x1600 x10000 1 10 x4096 2 x800 x5000 2 9 x2048 x400 x2500 8 x1024 x200 x1250 7 x512 x160 x1000 6 x256 x100 x500 5 x128 x80 x250 4 x64 x50 x125 3 x32 x40 x62.5 3 2 x16 x20 x25 1 x8 x10 x12.5 3 0 x4 x5 x6.25 3 table 2: configuration input c0 the interpolation factors shown in table 2 are the number or ab output cycles per sin/cos input cy- cle. there are four times as many ab output edges per sin/cos input cycle than as shown in the table. note that while the ic-tw8 is a true 16-bit interpo- lator, x10000 is the maximum interpolation factor available in pin configuration mode. full 16-bit (x16384) interpolation is available in serial configu- ration mode. 1 this interpolation factor can only be used with heavy filtering (c2 configuration levels 8?11) and lag recovery enabled (c3 configuration levels 6?11). 2 this interpolation factor can only be used with normal or heavy filtering (c2 configuration levels 4?11) and lag recovery enabled (c3 configuration levels 6?11). 3 z output is not synchronous with ab outputs when using fractional interpolation factors. setting the auto-adaption mode configuration input c1 is used to select the desired auto-adaption mode and the interpolation group cor- responding to the interpolation factor selected via configuration input c0. choose the desired auto- adaption mode and interpolation group from table 3 and connect the appropriate resistors to configura- tion input c1 (pin 31) according to table 1 to set the corresponding configuration level. c1 level auto-adaption mode interpolation group 11 a3: full analog and digital auto- adaption. i2 10 i1 9 i0 8 a2: full digital auto-adaption. i2 7 i1 6 i0 5 a1: digital offset and gain auto- adaption. i2 4 i1 3 i0 2 a0: no auto- adaption. i2 1 i1 0 i0 table 3: configuration input c1 three auto-adaption modes are available in pin con- figuration mode. mode a3 provides full analog and digital auto-adaption. in this mode, the ic-tw8 continuously adjusts analog gain, analog offset, digital offset, digital gain, and digital phase during operation to maintain optimum performance and lowest error and jitter. auto-adaption mode a2 provides full digital auto- adaption and is the recommended mode for most applications. in this mode, analog gain and offset are fixed at the values established during device cal- ibration (see auto calibration on page 12) and the ic-tw8 continuously adjusts only the digital offset, digital gain match, and digital phase during opera- tion to maintain optimum performance and lowest error and jitter. auto-adaption mode a1 is similar to mode a2 ex- cept that digital phase is fixed at the value estab- lished during device calibration and not adjusted during operation. in mode a0, auto-adaption is disabled and parame- ter values are not adjusted from their initial calibra- tion values during operation.
ic-tw8 16-bit sin/cos interpolator pin configuration mode jan 9, 2013 page pc10/15 copyright ? 2011?2013 ic haus www.ichaus.com preliminar y preliminary for example, to configure an interpolation factor of x80 and no auto-adaption, set c0 to configuration level 5 (r01 = 8.06k, r02 = 6.98k) and c1 to con- figuration level 1 (r11 = 12.1k, r12 = 3.01k). to configure an interpolation factor of x250 and full auto-adaption, set c0 to configuration level 5 (r01 = 8.06k, r02 = 6.98k) and c1 to configuration level 11 (r11 = 0). setting the filter mode and hysteresis configuration input c2 selects the amount of filter- ing (smoothing) and the hysteresis of the ab out- puts of the ic-tw8. choose the desired filter mode and hysteresis from table 4 and connect the appro- priate resistors to configuration input c2 (pin 32) according to table 1 to set the corresponding con- figuration level. c2 level ab filter mode hysteresis (ab edges) 11 heavy filtering. smooth output at the expense of fast response time. 1 10 2 9 4 8 8 7 normal filtering. a good balance between smoothness and response time. 1 6 2 5 4 4 8 3 minimal filtering. outputs respond quickly to sensor inputs (and noise). 1 2 2 1 4 0 8 table 4: configuration input c2 the choice of filter mode is a compromise between fast response, smoothness of the ab outputs, and position lag at constant speed. it is recommended to start with minimal filtering since this gives the fast- est response of the ab outputs to changes in the sin/cos inputs. normal or heavy filtering may be selected if the outputs are noisy or jittery. experi- mentation may be necessary to determine the opti- mal value. note that configuration level c2 also sets the ab output hysteresis in edges. the corresponding hyste- resis in degrees of a sin/cos input can be calculated using the following formula. h yst er esi s [ ? ] ? 90 interpolation ? hysteresis [ edges ] where interpolation is the interpolation factor set using configuration inputs c0 and c1. for example, if interpolation is set to x100 and hysteresis is set to 2 ab edges, the hysteresis in degrees of a sin/cos input cycle is hyteresis [ ? ] ? 90 100 ? 2 ? 1.8 ?
ic-tw8 16-bit sin/cos interpolator pin configuration mode jan 9, 2013 page pc11/15 copyright ? 2011?2013 ic haus www.ichaus.com preliminar y preliminary setting the maximum ab frequency and lag recovery configuration input c3 sets the maximum ab out- put frequency and determin es whether lag recovery is used or not. choose the desired maximum ab frequency and lag recovery setting from table 5 and connect the appropriate resistors to configuration input c3 (pin 33) according to table 1 to set the corresponding configuration level. c3 level maximum ab frequency lag recovery 11 fclock /8 lag recovery enabled. 10 fclock /16 9 fclock /32 8 fclock /64 7 fclock /128 6 fclock /256 5 fclock /8 lag recovery disabled. 4 fclock /16 3 fclock /32 2 fclock /64 1 fclock /128 0 fclock /256 table 5: configuration input c3 in pin configuration mode, the highest maximum output frequency of the ab outputs is fclock /8, where fclock is the clocking frequency of the ic- tw8 (see providing a clock on page 6). lower maximum output frequencies can be selected as shown in table 5 if devices connected to the ic- tw8 (counters, plcs, motion controllers, drives, etc.) cannot handle its full output frequency. the incremental sensor input frequency ( finput ) which corresponds to a given ab output frequency can be calculated using the following formula: fi nput ? ab frequency interpolation where interpolation is the interpolation factor set using configuration inputs c0 and c1. for example, if fclock = 32 mhz, an interpolation factor of 2500 is selected using c0 and c1, and c3 is at configuration level 8 ( fclock /64), the maximum ab frequency will be reached at a sensor input fre- quency of finput ? 32 64 2500 ? 0.0002mhz ? 200hz if the incremental sensor input exceeds this frequen- cy, the ab output position can no longer keep up with the sensor position. in this case, the ic-tw8 keeps generating output pulses at the maximum ab frequency until the ab output position either catch- es up to the sensor position or falls behind the sen- sor position by half a sin/cos input cycle, at which point the fault output (pin 20) is activated (latched low). this fault must be cleared by cycling power to the ic-tw8. lag recovery can be used to eliminate most of the position lag at constant speed caused by the ab output filter, at the expense of possible position overshoot on stopping. with lag recovery enabled, the ab output position ?catches up? to the sensor position during constant speed motion. however, enabling lag recovery also causes the ab output fil- ter response to become under-damped which can result in position over- and undershoot with fast sensor input position changes. this effect is worse with more ab output filtering (configuration input c2). at standstill, the ab output position is always equal to the sensor position regardless of the ab output filter and lag recovery settings. unless specifically required otherwise, it is recom- mended to use the highest maximum ab frequency and to disable lag recovery by setting c3 to configu- ration level 5. serial interfaces the spi and 1-wire serial interfaces of the ic-tw8 are fully active while in pin configuration mode. it is possible to read and write to memory and observe the current configuration. however, any changes made to the configuration are only temporary. after cycling power, the configuration reverts to that set by the configuration inputs c0?c3.
ic-tw8 16-bit sin/cos interpolator pin configuration mode jan 9, 2013 page pc12/15 copyright ? 2011?2013 ic haus www.ichaus.com preliminar y preliminary auto calibration once the ic-tw8 has been configured using the configuration inputs, the signal path must be cali- brated to determine proper values for gain, offset correction, gain match, and phase correction. this is most easily done using the auto calibration feature of the ic-tw8 to automatically determine optimum values for these parameters. auto calibration is initiated by pulling calib (pin 5) low. a pushbutton switch connected to calib (as shown in figure 2 on page 3) is an easy way to achieve this in series production. with calib held low, provide sensor input of a few hundred sin/cos cycles and the ic-tw8 ?tunes? the analog gain, ana- log offset correction, digital offset correction, digital gain match, and digital phase correction parameters to provide lowest error and jitter in the interpolated ab outputs. the sensor input used for auto calibration does not need to be at a constant frequency nor must it be unidirectional. a rotary encoder can be calibrated by moving the disc or wheel back and forth a few revo- lutions; a linear encoder by moving the sensor back and forth on the scale by a few centimeters. after providing sufficient input signals, release the calib input (it is pulled high by an internal pull-up resistor) and the ic-tw8 immediately stores all cal- ibration parameters in the external eeprom. these auto-calibrated values are then used whenever the ic-tw8 is powered up. ic-tw8 rotary encoder design tool a design tool in the form of an excel spreadsheet is available to simplify configuration of the ic-tw8 in rotary encoder applications. only 10 values (in en- gineering units) are required to completely specify the desired ic-tw8 configuration. the required configuration resistors values and performance lim- its and graphs are then available for implementation and characterization of the encoder. in the design tool spreadsheet, cells with a blue background are used for user entry. start by entering the operating voltage (vdd) as 5.0 or 3.3 and the frequency of the crystal you wish to use. the operat- ing voltage and crystal frequency affect the current drawn by the ic-tw8, which is calculated and shown for reference. the crystal frequency also af- fects the maximum speed and the filter response. in general, use the highest possible frequency unless there is a need to minimize current. continue by entering the resolution of the magnetic wheel or optical disc. this value is the number of sin/cos cycles per revolution of the wheel or disc produced by the sensor co nnected to the ic-tw8. next enter the desired output resolution of the en- coder as the number of ab cycles per revolution (cpr). this is also sometimes called ppr (pulses per revolution) and is equivalent to the number of ?lines? in a non-interpolated optical encoder. with these values entered, the design tool calculates and displays the required interpolation factor. inter- polation factors not available with the ic-tw8 (or not selectable in pin-configuration mode) are flagged by a warning in red ? output resolution not possible with given input resolution! ? in general, the output resolution in ab edges per revolution divid- ed by the input resolution must be an integer. next, enter the desired maximum speed (speed lim- it) for the encoder in rp m. the spreadsheet calcu- lates and displays the closest speed limit that can be implemented using the ic-t w8 in pin-configuration mode. the calculated actual speed limit is shown in rpm, ab channel frequency, ab edge frequency, and as minimum time between edges. exceeding the actual speed limit activates the ic-tw8?s fault output (pin 20). for an enclosed encoder the maximum speed is usu- ally dictated by the bearings used. for a modular
ic-tw8 16-bit sin/cos interpolator pin configuration mode jan 9, 2013 page pc13/15 copyright ? 2011?2013 ic haus www.ichaus.com preliminar y preliminary encoder (without bearings) or to use the full speed capability of the ic-tw8, enter an arbitrarily large value (such as 1,000,000 rpm). note that he calcu- lated actual speed limit is affected by the chosen crystal frequency and the interpolation factor used. next, enter the desired leve l of filtering for the ab outputs and whether lag recovery is desired. per- formance graphs of encoder lag in ab edges and response to a trapezoidal motion profile with con- stant acceleration, velocity, and deceleration are displayed to allow observing the effect of the differ- ent filter settings. scroll to the right on small com- puter screens to see the performance graphs. a single parameter (maximum acceleration) is used to generate the filter response graphs. enter a value in radians per second 2 that represents the maximum expected acceleration of the encoder. the design tool calculates the equivalent acceleration in units of krpm (1000 rpm) per second and time to reach the chosen maximum speed, which may be more easily understood. the acceleration value is used only to generate the performance graphs, it does not affect the configuration of the ic-tw8. the motion profile is generated by accelerating for 1000 adc samples at the entered acceleration, running at the attained speed for 1000 adc samples, and decelerating at the entered acceleration for 1000 adc samples. the maximum acceleration ( ? m ) of a motor in radi- ans per second 2 may be calculated knowing its stall torque ( ? s ) in newtons and its rotor inertia ( j r ) in kilogram seconds 2 using the formula ? m ? ? . for example, the maxon ec 90 flat 90w motor with the 24v winding (order number 323772) has a rotor inertia of 3,060 gcm 2 and a stall torque of 4,670 mnm. thus its no-load maximum acceleration in radians per second 2 is ? m ?? s j r ? 4670 3060 ? 10,000 ? 15,261 using this value for the maximum acceleration pa- rameter in the design tool will then show the per- formance of the ic-tw8 wh en used in an encoder for feedback with this motor. the graphs below show typical encoder lag and mo- tion profile performance of the ic-tw8 using nor- mal filtering and lag recove ry at 15,261 radians per second 2 maximum acceleration. figure 12: typical encoder performance graphs the design tool also calculates the encoder lag in ab edges per krpm and mechanical degrees (m) of encoder rotation at the chosen maximum speed for the selected filter configuration. for a given fil- ter and lag recovery setting, encoder lag is directly proportional to encoder speed. the design tool also calculates the position and speed overshoot due to the ab output filter. position overshoot (shown in ab edges and mechanical de- grees of encoder rotation) is proportional to the en- tered maximum acceleration and is typically noticed on stopping (deceleration). at low acceleration val- ues and/or low encoder resolutions, position over- shoot may be less than one ab edge and thus totally -50 0 50 100 150 200 250 300 350 0 2 4 6 8 10 12 14 16 18 speed (rpm) time (ms) speed profile input output -1,0 -0,5 0,0 0,5 1,0 1,5 2,0 2,5 024681012141618 ab edges time (ms) encoder lag
ic-tw8 16-bit sin/cos interpolator pin configuration mode jan 9, 2013 page pc14/15 copyright ? 2011?2013 ic haus www.ichaus.com preliminar y preliminary undetectable during encoder operation, even with heavy filtering. speed overshoot is calculated as a percent of speed. speed overshoot is typically noticed at the end of the acceleration ramp (the beginning of the constant velocity portion of the motion profile). speed over- shoot as a percent of speed is affected only by the selected ab filter level and whether or not lag re- covery is used. the actual amount of speed over- shoot in rpm is proportional to encoder speed. next, enter the desired ab output hysteresis in ab edges. the design tool calculates the equivalent hys- teresis in degrees of a sin/cos input cycle. hystere- sis is used to prevent instability (dithering) of the ab outputs at standstill due to noise. in general, use the lowest hysteresis that produces stable ab out- puts with no sensor motion. next enter yes or no as to whether an index sensor is used. if an index sensor is not used, the zero inputs of the ic-tw8 should be connected to avdd and avss as explained on page 5. if an in- dex sensor is used the width of the z output pulse is shown. the z output pulse is always one ab edge (one quadrature state) wide in pin configuration mode. the z output is s ynchronous with a and b low when an integer interpolation factor is used. not using an index sensor allows higher speeds with high interpolation factors. enter the desired auto-adaption mode for the ic- tw8. auto-adaption refers to the ic-tw8?s ability to track and change (adapt) sensor gain, offset, and phase during encoder operation to maintain low ab output error and jitter under all operating conditions. one of four auto-adaption modes can be selected and the design tool confirms which ic-tw8 param- eters are adapted during operation. regardless of the selected mode, auto-adaption is disabled above the displayed speed. in pin configuration mode, the maximum auto-adaption speed is fixed and depends on the selected maximum speed, crystal frequency, and interpolation factor. at this point, the ic-tw8 configuration is complete- ly specified and the configuration resistor values necessary to achieve this configuration are shown. see figure 11 on page 2 for a schematic of the elec- trical connection of the resistors to the ic-tw8. al- so shown is a jumper map for setting the tw8_1d demo board to the selected configuration. finally, the design tool shows the conditions which activate or latch the fault output (pin 20). latched faults are cleared by cycling power to the ic-tw8. pin configuration reference at power-on, the four c onfiguration input levels (c0?c3) are read and used to set internal variables of the ic-tw8 to the proper values. other internal variables are also set to specific values and cannot be changed using the configuration inputs. table 6 provides a list of the internal variable values used in pin configuration mode as a reference for trouble- shooting or new applications. variables not listed in the table are set to 0. detailed information on all ic- tw8 internal variables is available in the serial configuration manual. ic-tw8 variable value (pin configuration mode) main_cfg wp = 1 main_inter determined by c0 and c1. main_hyst determined by c2. main_fltr determined by c2 and c3. main_out start = 10 (0x0a) main_clock xtal = 1 div = 3 ab_cfg0 startmode = 1 ab_vtop determined by c3. adpt_cfg determined by c1. adpt_detail flimit = 6 tbase = 4 adpt_corr prop = 2 offtol = 2 gaintol = 2 mon_off limit = 10 mon_gain limit = 10 mon_phase limit = 10 flt_cfg vwarn = 1 long = 1 flt_en ee = 1 vfatal = 1 table 6: pin configuration reference
ic-tw8 16-bit sin/cos interpolator pin configuration mode jan 9, 2013 page pc15/15 copyright ? 2011?2013 ic haus www.ichaus.com preliminar y preliminary ic-haus expressly reserves the right to change its products and/ or specifications. an info letter gives details as to any amend ments and additions made to the relevant current specifications on our internet website www.ichaus.com/infoletter ; this letter is generated automatically and shall be sent to registered users by email. copying ? even as an excerpt ? is only permitted with ic-h aus' approval in writing and pr ecise reference to source. ic-haus does not warrant the accuracy, completeness or timeliness of the specification and does not assume liability for any er rors or omissions in these materials. the data specified is intended solely for the purpose of product de scription. no representations or warranties, either express or implied, of merchantability, fitness for a particular pur pose or of any other nature are made he reunder with respect to information/specifi cation or the products to which information refers and no guarantee with respect to compliance to the intended use is given. in particular, this also app lies to the stated possible applications or areas of applications of the product. ic-haus conveys no patent, copyright, mask work right or other trade mark right to this product. ic-haus assumes no liability f or any patent and/or other trade mark rights of a third party resulting from processing or handling of the product and/or any other use of the product. revision history date notes pages affected sept 06, 2011 first release all oct 24, 2011 correction of examples 1 and 2 page a10 feb 21, 2012 re-format all mar 16, 2012 re-write all april 30, 2012 minor changes for consistency with programmer?s reference many oct 9, 2012 table 6, changed main_servo to main_fltr 14 nov 22, 2012 formal corrections of header layout; update of disclaimer all jan 9, 2013 z output not synchronous with ab outputs when using fractional interpolation factors. 9, 14
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc1/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary table of contents about this document ........................................... 2 documentation conventions ................................. 2 functional overview ............................................. 3 functional block diagram .................................... 4 clock generator .................................................. 4 power-on reset .................................................. 4 serial ports .......................................................... 4 eeprom interface ............................................. 4 internal memory ................................................. 4 ab signal path .................................................... 5 analog gain .................................................... 5 analog offset correction ............................... 5 analog-to-digital converters (adcs) ............ 5 digital offset correction ................................ 5 digital gain match correction ....................... 5 digital phase correction ................................. 6 angle calculation (arctan) ............................. 6 sensor distortion lut ................................... 6 filter ................................................................ 6 digital hysteresis ............................................ 8 interpolation factor ........................................ 8 output generator ............................................ 8 z signal path ....................................................... 8 auto calibration and auto adaption .................. 8 auto store ........................................................... 9 fault handling ..................................................... 9 adc and adaption quality monitors ................. 9 electrical connections ........................................ 10 providing a clock .............................................. 11 connecting the eeprom ................................. 12 connecting the incremental sensor .................. 12 connecting an index sensor (if used) .............. 13 connecting the abz outputs ............................ 14 connecting the serial ports ............................... 14 power-on-reset ................................................. 14 startup .................................................................. 15 serial configuration overview .......................... 15 rotary encoder design tool .............................. 16 general configuration ...................................... 16 ab configuration ............................................. 18 filter configuration .......................................... 19 z configuration................................................. 21 auto adaption configuration ........................... 21 fault pin configuration ................................ 22 adc quality monitor ....................................... 23 adaption quality monitor ................................ 24 status pin configuration .............................. 24 lut configuration ........................................... 24 cfg block ........................................................ 24 gui hex ............................................................ 24 auto calibration .................................................. 25 calibrating the z signal path ............................ 26 no index sensor................................................ 26 digital output index sensor ............................. 27 analog output index sensor ............................. 28 using serial-only output mode ........................ 30 using pwm output mode .................................. 31 using the post-ab divider .................................. 32 tuning the internal oscillator ........................... 33 using the lut ..................................................... 34 revision history .................................................. 36
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc2/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary about this document this document describes the serial configuration mode of the ic-tw8 interpolator. serial configura- tion mode requires configuration using the spi or 1- wire communication ports and allows access to all the powerful features of the ic-tw8 for creating sophisticated applications. for simple applications, pin-configuration mode pr ovides simple, static con- figuration of the device without any programming or complicated calibration. pin configuration mode is described in a separate document. design tools for both rotary and linear encoders us- ing the ic-tw8 are available. these tools are in the form of excel spreadsheet s that allow entering ap- plication parameters in engineering units and then provide performance limits and graphs, configura- tion register values, and configuration documenta- tion for the application. this greatly simplifies and speeds up the design process of encoders using the ic-tw8. documentation conventions throughout this document, hexadecimal values are written in c-style where the hex value is preceded by ?0x?. for example, 80ca 16 is written as 0x80ca. internal ic-tw8 registers are named using all capital letters. individual bits or bit groups with- in the register use lower case roman lettering. for example, main_cfg.wp refers to the wp bit (bit 0) in the main_cfg register at address 0x8044. likewise, main_out.mode refers to the 2-bit group mode (bits 4 ? 5) of register main_out at address 0x804b. see the programmer?s reference document for complete information on all ic-tw8 registers. derived variables not explicitly available as register values are shown in all lower-case italics . for ex- ample, the formula inter ? main_inter 4 shows that internal variable inter is derived from the value in the main_inter register. internal variable units-of-measure are shown in brackets following the variable name. for instance adcs [v] is the sin channel adc input level in volts.
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc3/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary functional overview the ic-tw8 is a general-purpose 16-bit sin/cos interpolator with sophisticated auto-calibration functions. it accepts 10 ? 700mv differential analog sin/cos input signals from magnetic or optical sen- sors and calculates (interpolates) the angular posi- tion. output is industry-standard incremental ab quadrature at programmable resolution. automatic calibration requires no complicated signal analysis or calibration procedure during product design or production. auto-adaption monitors and adapts pa- rameter values during operation to maintain optimal performance and low error and jitter. in addition to the chosen sensor, the ic-tw8 re- quires an external eeprom to store its configura- tion and calibration data. an external crystal can be used instead of the internal oscillator of the ic-tw8 for superior frequency stability. a differential line driver can be connected directly to the ic-tw8 quadrature outputs to make a complete encoder. figure 1: ic-tw8 functional overview outa outb outz zero cos sin interpolation factor of x5 shown index pulse is suppressed as zer o is low.
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc4/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary functional block diagram a functional block diagram of the ic-tw8 is shown in figure 2 and explained on the following pages. figure 2: block diagram clock generator the clock generator uses an external crystal or oth- er clock source to generate the internal core clock ( fcore ) for the ic-tw8. an inte rnal oscillator is also provided which can be used if an external crystal is not desired. the internal core clock controls all tim- ing within the ic-tw8. power-on reset the power-on reset (por) circuit provides orderly startup of the ic-tw8 when power is applied. an external reset source can also be connected to the por to allow independent control of device startup. serial ports the ic-tw8 contains two serial ports that may be used for communication. these are a standard spi (serial peripheral interface) slave port and a 1-wire port, both of which utilize the same communication protocol (see serial communication ports in the programmer?s reference). both ports may be used simultaneously. eeprom interface a 24xx02 through 24xx16 family i 2 c eeprom is required for storage of sensor calibration data (off- set, gain, etc.). the eeprom connects directly to the ic-tw8 via the dedicated i 2 c eeprom inter- face. internal memory the ic-tw8 provides 32k bytes of internal memory divided into eight functional blocks that can be accessed by the user via either of the serial ports. see internal memory in the programmer?s reference for more information. ab signal path arc- tan hyst sin+ sin? cos+ cos? outa outb outz adc pga pga error corr. adc analog gain analog offset correction anti-aliasing filter digital offset correction gain match correction phase correction lut inter analog-to-digital converters angle calculation sensor distortion correction (lookup table) filter (servo loop) interpolation factor calculation ab/pwm output generator filter output generator digital hysteresis power-on reset clock generator adc quality monitor adaption quality monitor fault handling internal memory serial ports eeprom interface zero+ zero? x8 auto calibration auto adaption auto store z comparator spi_xss spi_sclk spi_si spi_so ir wp scl sda xin xout xrst fault status position v e l o c i t y calib z signal path delay
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc5/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary ab signal path the ab signal path consists of the blocks between the analog pgas and the output generator. the front end of the ab signal path is shown below. figure 3: ab signal path front end analog gain analog gain is applied to the raw sin/cos sensor inputs by two programmable gain amplifiers (pgas) with a range of 6 ? 45 db in 3db steps. the actual analog gain, again , is determined by the pa- rameter again in the par block in internal memory. the same gain is applied to both channels. analog offset correction individual analog offset correction is applied to the output of the two analog pgas this is a coarse cor- rection with a range of 3.1v in 100mv steps. the actual analog offset corrections for the sin and cos channels, aoffs and aocffc respectively, are deter- mined by the parameters aoffs and aoffc in the par block in internal memory. the effective analog offset correction referenced to the input sin/cos signals, aoffins and aoffinc is a function of the analog gain and can be calculated as aoffins ? aoffs agai n ; aoffi nc ? aoffc agai n analog-to-digital converters (adcs) the two adcs convert the conditioned analog sin and cos signals into 14-bit digital values for further processing. the remainder of the ab signal path is completely digital. the adcs in the ic-tw8 operate best with inputs limited to 1.4v maximum, which corresponds to an output value of approximately 5800 adc in- crements. above these values, adc distortion in- creases and produces a corresponding reduction in interpolation accuracy. digital offset correction individual fine offset correction is next applied to the digital sin and cos adc outputs. a range of fine offset correction of 125mv in 244v steps at the adc inputs is available. the actual digital offset corrections for the sin and cos channels, doffs and docffc respectively, are determined by the parame- ters doffs and doffc in the par block in inter- nal memory. the effective digital offset correction referenced to the input sin/cos signals can be calculated as doffi ns ? doffs agai n ; doffi nc ? doffc agai n digital gain match correction next, digital gain match correction is applied to ei- ther the sin or cos channel to correct any mismatch between the two signal amplitudes. the actual digi- tal gain values for the sin and cos channels, dgains and dgainc respectively, are determined by the dgain parameter in the par block in internal memory. a range of 1.25 in steps of 0.000244 at the adc inputs is available. adc adc sin+ cos+ again analog gain aoffs aoffc analog offset correction doffs doffc digital offset correction dgains digital gain match correction digital phase correction dgainc dphase 1.4v max 5800 max (digital) sin output sin? cos? cos output
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc6/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary digital phase correction lastly, phase correction is applied to the sin and cos channels to guarantee 90 phase shift between the two signals. the actual digital phase correction, dphase , is determined by the dph parameter in the par block in internal memory. a range of 53 in steps of 0.056 is available. angle calculation (arctan) the angle within an input cycle indicated by the conditioned digital sin and cos signals is next cal- culated as arctan (sin/cos) with a resolution of 14 bits using a cordic algorithm. sensor distortion lut an optional 64-byte lookup table (lut) is provided to allow correction of any remaining sensor distor- tion (see using the lut on page 34). the lut can be bypassed if not required. filter a filter is provided in the ab signal path that adds two bits of resolution to the angle calculation (giv- ing 16-bit angle resolution), reduces noise and jitter in the ab outputs, and can reduce angle lag at con- stant speed due to interpolator latency. the filter is implemented as a pi servo loop with feedback path delay as shown below. figure 4: ab signal path filter the filter parameters pgain , igain , and delay are determined by variables in the main_fltr regis- ter in the cfg block in internal memory. the main_fltr register value necessary to realize a given filter configuration is called its ?instance?. because of the performance tradeoffs related to the selection of the filter parameters, it is helpful to de- fine three filter modes to make parameter selection easier. experimentation may be necessary to deter- mine optimal filter parameters. ic-tw8 filter modes mode description p low-pass filter with lag. pi critically-damped low-pass filter with no filter lag. lag recovery under-damped low-pass filter with no filter lag and reduced latency lag. p mode is the simplest filter mode and uses only pgain ( igain = delay = 0). in p mode, the signal path filter configuration reduces to figure 5: p mode filter configuration in p mode, the pgain value determines the noise and jitter bandwidth of the filter. position lag at constant sensor input velocity is directly proportional to the velocity and inversely proportional to pgain . there is no position or speed overshoot in p mode. pgain 14 16 from lut to hysteresis delay - igain 1 s 1 s delay pgain - 1 s
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc7/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary the following p mode filter instances 1 and approx- imate filter bandwidths (?3db) are available. p mode filter instances instance noise and jitter bandwidth [khz] 112 2.5 ? fc o re [mhz] (minimum lag) 114 2.5 3 ? fcore [mhz] 116 2.5 7 ? fcore [mhz] 118 2.5 15 ? fcore [mhz] 120 2.5 31 ? fcore [mhz] 122 2.5 63 ? fcore [mhz] 124 2.5 127 ? fcore [mhz] (maximum lag) in general, use the maximum filter bandwidth (in- stance 112); this gives the fastest response and min- imum filter lag. another instance may be used if additional noise and jitter filtering is required. pi mode adds igain to the p mode filter, eliminating filter lag at constant sensor input velocity at the ex- pense of critically damped filter response. in pi mode, the signal path filter configuration is figure 6: pi mode filter configuration in pi mode, filter lag at c onstant sensor input veloci- ty is eliminated, but position and speed overshoot are inversely proportional to filter bandwidth. 1 the filter instance is the main_fltr register value necessary to realize the given filter. the following pi mode filter instances and approx- imate filter bandwidths (?3db) are recommended (instances not shown may cause unstable filter re- sponse). recommended pi mode filter instances instance noise and jitter bandwidth [khz] 52 2.5 7 ? fcore [mhz] (minimum overshoot) 70 2.5 15 ? fcore [mhz] 88 2.5 31 ? fcore [mhz] 106 2.5 63 ? fcore [mhz] (max. overshoot) in general, use the maximum filter bandwidth (in- stance 52); this gives the fastest response and mini- mum position and speed overshoot. another in- stance may be used if additional noise and jitter fil- tering is required. lag recovery mode adds delay to the feedback path of the pi mode filter, re ducing latency-induced posi- tion lag at constant sensor input velocity at the ex- pense of under-damped filter response. in lag recov- ery mode, the signal path filter configuration is as shown in figure 4 on page 6. in lag recovery mode, positi on lag at constant sensor input velocity due to interpolator latency is reduced, but filter response is under-damped and position and speed overshoot are inversely proportional to filter bandwidth. the following la g recovery mode filter instances and approximate filter bandwidths (?3db) are recommended (instances not shown may cause unstable filter response). recommended lag recovery mode filter instances instance noise and jitter bandwidth [khz] 71 2.5 15 ? fcore [mhz] (min. overshoot) 89 2.5 31 ? fcore [mhz] 107 2.5 63 ? fcore [mhz] (max. overshoot) in general, use the maximum filter bandwidth (in- stance 71); this gives the fastest response and mini- mum position and speed overshoot. another in- stance may be used if additional noise and jitter fil- tering is required. pgain - igain 1 s 1 s
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc8/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary digital hysteresis digital hysteresis may be added to the interpolated sensor input angle to reduce ab output dithering (instability) at standstill at the expense of position error on direction reversal. a hysteresis range of 0 ? 22.5 of an input cycle in 0.044 steps is available. the actual hysteresis, hyst [], is determined by the main_hyst register in the cfg block in internal memory. interpolation factor the 16-bit sensor input angle value is scaled to the resolution required by the desired interpolation fac- tor. a range of 4 ? 65,536 ab output edges per sen- sor sin/cos input cycle in steps of 1 edge is availa- ble. this is equivalent to a interpolation range of x1.00 ? x16,384.00 ab output cycles per input cy- cle in steps of 0.25 ab output cycle. the actual in- terpolation factor, inter , is determined by the main_inter register in the cfg block in internal memory. output generator the output generator generates quadrature ab out- puts or a pulse-width modulated (pwm) bit stream output depending on the output mode. the output mode is determined by main_out.mode in the cfg block in internal memory. the output genera- tor also uses the conditioned zero signal from the z signal path to generate a z output that can be syn- chronized to the ab outputs. the output generator contains an optional divider that can be used in ab output mode to produce frac- tional interpolation factors. this is useful in situa- tions where the desired output resolution is not an integer multiple of the input resolution. z signal path the z signal path is similar to the front end of the ab signal path except that a 1-bit adc (compara- tor) is used. figure 7: z signal path a fixed analog gain of 8 is applied to the differential zero sensor input. a threshold offset is then added to the amplified zero signal to set the switching threshold of the comparator. the actual analog threshold level, zth , is determined by main_z in the cfg block in internal memory and has a range of 300mv in 20mv steps. the effective zero input threshold therefore has a range of 37.5mv in 2.5mv steps. to ensure that the digital zero signal stays in syn- chronization with the digital sensor angle at all sen- sor speeds, a delay matching the inherent latency of the ab signal path is introduced into the z signal path. the delayed and conditioned digital zero signal is then sent to the output generator where the z output is generated and ca n be synchronized to the ab outputs. auto calibration and auto adaption the ic-tw8 provides sophisticated automatic cali- bration and adaption features to allow optimal pa- rameter values for the ab signal path to be set and maintained during operation. auto calibration is used to determine initial parameter values when the ic-tw8 is first commissioned. the calib input (pin 5) or commands over one of the serial interfac- es may be used to initia te auto calibration. auto adaption is used to maintain (adapt) optimal parameter values for the ab signal path during op- eration. auto adaption can adjust analog gain, ana- log offset correction, digital offset correction, digital gain match, and digital phase correction to ensure maximum interpolator accuracy under all operating conditions. auto adaption is controlled by variables in the adpt_corr and adpt_detail registers in the cfg block of internal memory. zero+ zero? zth delay to output generato r zgain = 8 comparator delay match
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc9/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary auto store the ic-tw8?s auto store feature automatically stores adapted parameter values to the eeprom during operation for use as the startup values at the next power-up. a double buffer is used which en- sures a consistent set of ab signal path parameters at every startup. auto store is controlled by varia- bles in the adpt_store register in the cfg block of internal memory. fault handling the ic-tw8 provides comprehensive fault handling features and a hardware fault output (pin 20) to notify external systems of faults and warnings dur- ing operation. real-time fault status is also available over the serial ports. the following signal path conditions are monitored and can be configured to activate the fault out- put. signal path fault/status conditions adc overflow adc underflow excessive adaption speed limit exceeded overspeed warning fatal overspeed fault excessive filter lag excessive ab output lag 1-wire interface time-out external crystal fault these conditions can be monitored in real time over either of the serial ports by reading the stat_sp register in the var block in internal memory. the following eeprom conditions are monitored and can be configured to activate the fault out- put. eeprom fault/status conditions communication timeout hardware fault wrong eeprom id cfg block checksum error par block 0 checksum error par block 1 checksum error par_base block checksum error lut block checksum error wrong configuration mode these conditions can be monitored in real time over either of the serial ports by reading the stat_ee register in the var block in internal memory. the conditions that activate or latch the fault output are determined by bits in the flt_cfg and flt_en registers in the cfg block in internal memory. adc and adaption quality monitors the ic-tw8 provides a sophisticated quality evalu- ation feature with a hardware status output (pin 19) to monitor signal amplitude and auto adaption during operation. operation of the quality monitors is controlled by bits in the mon_cfg register in the cfg block in internal memory. real-time quali- ty status is also available over the serial ports. the adc quality monitor continuously evaluates the amplitude of the sensor signal at the output of the analog-to-digital converters in the ab signal path and provides a pulse-width modulated signal on the status output that is inversely proportional to relative signal amplitude. thus the status out- put can be used to drive an led whose brightness or color is proportional to sensor signal amplitude for early warning of a possible future failure. the adc quality monitor levels are determined by vari- ables in the mon_adc register in the cfg block in internal memory. the adaption quality monitor continuously evalu- ates the deviation of the adapted ab signal path pa- rameters from their base values and provides a pulse-width modulated signal on the status out- put that is proportional to the amount of deviation. thus the status output can be used to drive an led whose brightness or color is proportional to the relative amount of adaption that has occurred for early warning of a possible future failure. the adap- tion quality monitor levels are determined by varia- bles in the mon_off, mon_gain, and mon_phase registers in the cfg block in inter- nal memory.
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc10/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary electrical connections the basic electrical connections for an encoder us- ing the ic-tw8 are shown in figure 8. other than the analog sensor, only an eeprom for parameter storage and a few bypass capacitors are required for operation. pinsel (pin 22) must be connected to dvss to select serial confi guration mode and either the spi or 1-wire serial ports must be connected to an appropriate master for configuration. a voltage regulator to supply clean power to the device and a line driver are recommended. a crystal or oscillator (clock driver) is recommended for all but the most cost-sensitive applications. the ic-tw8 requires a high quality ground and clean power supplies. analog ground (avss = pin 46) and digital ground (dvss = pin 15) must both be connected on the pcb to a solid ground plane. analog power (avdd = pin 38) and digital power (dvdd = pin 21) inputs must be connected to a low impedance 5v or 3.3v power source, preferably an on-board voltage regulator. in addition, avdd and dvdd should each have a dedicated 1f decou- pling capacitor placed as close to the power pins on the device as possible. if the ic-tw8 is used with a line driver (such as the ic-hd7 or ic-hx ) or a high frequency fpga, it is especially important to isolate the ic-tw8 power inputs (avdd and dvdd) against external noise. in such applications, a dual voltage regulator such as the ic-dc is highly recommended. note that both avdd and dvdd must be the same voltage level (5v or 3.3v). figure 8: ic-tw8 electrical connections (serial configuration mode) both pin vc (pin 44) and vref (pin 45) must be decoupled to ground with 1f each as shown. the eeprom and the line driver (if used) must be de- coupled according to their respective requirements. the calibration button provides an easy means to activate the auto-calibration feature of the ic-tw8 to set the data path parameters (offset, gain, and phase) to their optimal values. all pins not explicitly shown in figure 8 should be connected to appropri- ate levels as indicated under pin functions in the ic- tw8 data sheet. vref vc 1f 1f 1f avdd avss vdd_tw8 1f dvdd eesel vdd_tw8 sin+ sin- cos+ cos- 10f vdd_tw8 vdd_main outa outb outz regulator line driver mr sensor ic-tw8 scl sda scl sda eeprom 24aa02 vdd_tw8 calib calibration button pinsel dvss pinsel tied to dvss for serial configuration mode eesel tied to dvss. wp wp spi_so spi_si spi_sclk spi_xss ir } spi communication port 1-wire communication port
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc11/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary providing a clock the ic-tw8 supports three clocking modes as indicated in figure 9. the ic-tw8 provides an internal oscillator that, while it can be tuned, is not particularly stable over temperature. thus, an external crystal or other clock source is recommended for all but the most cost-sensitive applications. figure 9: clocking an external crystal or oscillator provides the most stable clock signal over time and temperature var- iations, resulting in the most consistent long-term ic-tw8 performance. connect an external crystal to xin (pin 35) and xout (pin 34) as shown in figure 9. depending on the crystal characteristics, two capacitors to ground might be necessary for stable oscillation. to use an oscillator or ceramic resonator, connect xin (pin 35) to ground and the oscillator output to xout (pin 34) as shown in figure 9. maximum crystal frequency ( fclock ) is 32 mhz with 5v supplies and 24 mhz with 3.3v supplies. minimum frequenc y is 6 mhz regardless of supply voltage. to use the internal oscillato r, connect both xin (pin 35) and xout (pin 34) to ground as shown in figure 9. the ic-tw8?s internal oscillator has a nominal fre- quency of 20 mhz with 5v supplies and 16 mhz with 3.3v supplies and can be tuned (see page 33). howev- er, manufacturing tolerances and changes in tempera- ture can cause large variations in the frequency of the internal oscillator. xout xin ic-tw8 xout xin ic-tw8 xout xin ic-tw8 crystal clock inject internal oscillator
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc12/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary connecting the eeprom the ic-tw8 requires a 24xx02 through 24xx16 family i 2 c eeprom for storage of sensor calibra- tion data (offset, gain, etc.). the eeprom con- nects directly to the ic-tw8 via a dedicated i 2 c communication channel using scl (pin 27) and sda (pin 28) as shown in figure 10. no external pull-up resistors are required. eesel (pin 4) of the tw8 must also be connected to dvss as shown. figure 10: eeprom connection in serial configuration mode, the write protect (wp) input of the eeprom is controlled by the ic-tw8. wp must be disabled via the serial port during calibration to allow the ic-tw8 to write parameter values to the eeprom. in operation, wp can be left enabled or disabled as required by the application. connecting the incremental sensor the ic-tw8 connects directly to magnetic (such as the ic-sm2l or ic-sm5l ) or optical sensors provid- ing differential sin/cos outputs as shown in figure 11. signal amplitude (a) from al l four sensor channels must be in the range of 5 ? 350mv as shown in figure 12 for proper operation with the ic-tw8. figure 11: differential sensor connection figure 12: differential sensor signal inputs sda wp 1f dvdd dvss vdd sda wp eeprom 24xx ic-tw8 scl scl 1f vdd vcc vss eesel eesel tied to dvss. sensor bridge 0 sensor bridge 1 sin+ sin- cos+ cos- ic-tw8 avdd 0 (vdd/2) sin+ sin- a ?a 5mv a 350mv 0 180 360
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc13/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary single-ended sin/cos inputs can also be connect- ed to the ic-tw8 by connecting the sin? and cos? pins to the proper bias voltage as shown in figure 13. since the ic-tw8 provides high- impedance signal inputs, a simple resistive volt- age divider can be used to generate the required bias voltage. for amr sensors, it is recommend- ed that the resistors of the bias generator match the amr sensor bridge resistance to improve power supply noise rejection. no decoupling ca- pacitor should be used. figure 13: single-ended sensor connection differential inputs should be used whenever pos- sible to reject common mode distortions and pro- vide increased signal amplitude and improved signal to noise ratio (snr). regardless of input configuration, the auto- calibration feature of the ic-tw8 is sufficient in most cases to compensate for any signal offset, gain, and phase distortions without requiring any additional external components. connecting an index sensor (if used) the ic-tw8 can interface to a wide range of index sensors or gating sources to provide an index or z output which is synchronized with the ab outputs. digital hall sensors are often used for this purpose, as shown in figure 14. figure 14: digital index sensor connection digital sensors (hall, mr, and others) typically pro- vide an active-low signal via an open-drain output that pulls low in the presence of a magnetic field. connect an active-low (open drain) digital index sensor to the ic-tw8 zero? input (pin 48) and connect the zero+ input (pin 47) to a resistive voltage divider set to the midpoint of the index sensor output voltage swing to provide good noise rejection. for active-high (open source) digital index sensors, reverse the zero+ and zero? connections. analog-output index sensors, such as mr bridges, can also be used with the ic-tw8 in serial configuration mode as shown in figure 7. figure 15: analog index sensor connection if no index (z) output is required, connect zero+ (pin 47) to ground and zero? (pin 48) to avdd. sensor bridge 0 sensor bridge 1 sin+ sin- cos+ cos- ic-tw8 avdd resistive bias genera t o r zero+ zero- v dd ic-tw8 digital hall active low v dd ic-tw8 mr index sensor zero+ zero-
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc14/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary connecting the abz outputs the ic-tw8 provides industry-standard quadrature incremental outputs at outa (pin 18) and outb (pin 17). if an index sensor is connected to the zero inputs of the ic-tw8, a z output synchro- nous with the ab outputs is also available on outz (pin 16). these outputs can be directly connected to an encoder counter such as the ic-tw9 . alternatively, the abz outputs can be connected to a differential line driver (such as the ic-hd7 or ic- hx ) as shown in figure 16. when using a line driv- er it is especially important to isolate the ic-tw8 from external switching noise using a regulator, as shown. figure 16: line driver connection connecting the serial ports the ic-tw8 contains two serial ports that may be used to access internal registers for configuration. these are a standard spi (serial peripheral inter- face) slave port and a 1-wire port, both of which utilize the same communication protocol (see serial communication ports in the programmer?s refer- ence for the protocol definition). both ports may be used simultaneously. the spi slave port uses a 3-wire or 4-wire full- duplex interface which operates in cpol = 0 and cpha = 0 mode only. this means that the base (resting) value of spi_sclk (pin 27) is low, spi_si (pin 10) is sampled on the rising edge of spi_sclk, and spi_so (pin 9) is changed on the falling edge of spi_clck. when using a 4-wire spi interface, the spi_xss input (pin 14) is used to enable the spi port when- ever communication is required. when using a 3- wire spi interface, the spi_xss input must be tied to dvss. the 1-wire port uses a single bi-directional data line connected to ir (pin 7) for communication. the bit stream is pulse-width modulated: a 1-bit is encoded as a long high level followed by a short low level, a 0-bit is encoded as a short high level followed by a long low level. a timeout circuit activates a status bit in the stat_sp register (see programmer?s reference) in the event of an illegal transaction. power-on-reset the ic-tw8 contains a built-in power-on-reset (por) circuit that controls the safe start-up of the device. the internal por can be configured for two thresholds, 2.7v for use with 3.3v supplies or 4v, which is recommended when operating the ic-tw8 at 5v. connect xrst (pin 2) dvdd or leave it unconnected (xrst has an internal 40k ? pullup resistor to dvdd) to select a power-on-reset threshold of 2.7v. connect xrst to ground through a 68k ? resistor to select a threshold of 4v. an external reset source (such as an rc circuit) can also be con- nected to xrst (pin 2) to directly control the por behavior. figure 17: setting the power-on-reset threshold outa outb outz line driver ic-tw8 e1 a1 a2 e3 e5 a3 a4 a5 a6 ic-hx 5v 3.3v vb1 vb2 vb3 vcc avdd dvdd 24v regulator regulator gndx avss/dvss dvdd ic-tw8 xrst connect xrst to dvdd (or leave floating) for 2.7v por threshold. ic-tw8 xrst connect xrst to dvss via 68k ? resistor for 4v por threshold. 68k ? dvss
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc15/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary startup in operation, the startup sequence is initiated when power is applied to the ic-tw8. however, a startup sequence can also be initiated by external hardware connected to the xrst input (pin 2), or by the re- start command (write 0x40 to 0x80b0). see the ic- tw8 programmer?s reference for more information on executing commands. after power-up, the ic-tw8?s por circuit monitors the supply voltage and waits until it has reached the appropriate threshold (as determined by the xrst connections). the ic-tw8 then starts up using the internal oscillator (even if a crystal or external clock source is connected) and executes its start-up cycle as outlined here. 1. read configuration and parameter values from eeprom. 2. set proper clock source and frequency. 3. enable the signal path. 4. wait for all analog circuitry to settle. 5. clear all errors. 6. start abz output generation. if any errors are detected during the start-up cycle, the ic-tw8 does not enable the outputs but goes into an idle state with er r (pin 20) asserted (low). the amount of time the ic-tw8 waits for the ana- log circuitry to settle ( twait ) is configured using the internal variable main_out.start. serial configuration overview in serial configuration mo de, values for all configu- ration variables must be written to the tw8?s inter- nal cfg block registers before the device can be used. the easiest way to accomplish this is to use the free encoder design tools along with the ic-tw8 demo board and the free graphical user interface (gui) software. the encoder design tools?in the form of excel spreadsheets?allow entering applica- tion parameters in engin eering units and then pro- vide configuration register values that can be direct- ly written to the ic-tw8 using the gui software. the encoder design tools also provide performance limits and graphs and conf iguration documentation. the ic-tw8 tw8_1d evaluation board implements the ic-tw8 along with a 24aa02 eeprom, 24mhz crystal, and an spi interface (with 3.3v to 5v level shifter if required) to the ic-mb3u-i2c pc adapter for direct communication with the gui software. a functional prototype can thus be quickly assembled by connecting only a sensor and optional line driver. see the tw8_1d evaluation board doc- umentation for more information. once the ic-tw8 has been configured, the ab sig- nal path must be calibrate d to determine proper val- ues for gain, offset correction, gain match correc- tion, and phase correction. this is most easily done using the auto calibration feature of the ic-tw8 to automatically determine optimum parameter values. alternatively, initial parameter values may be writ- ten over the serial interface and allowed to adapt. the adapted parameter values can then be written to the eeprom.
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc16/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary rotary encoder design tool a design tool in the form of an excel spreadsheet is available to simplify configuration of the ic-tw8 in rotary encoder applications. the design tool requires answers to questions and input of desired applica- tion specifications (in engineering units) to produce the desired ic-tw8 configuration (cfg block regis- ter values). these values can then be written directly to the ic-tw8 over the spi or 1-wire serial inter- faces to configure the device. in the design tool spreadsheet, cells with a blue background are for user entry. cells without a blue background are fixed or calculated by the spread- sheet and cannot be edited. depending on answers to previous questions, certa in blue background cells may be labeled ?ignore?. in this case, the entered value has no effect on device operation. register values and internal variables calculated from user input are shown in column f or i (typically) on the spreadsheets. these correlate directly to the register and variable descriptions in the ic-tw8 program- mer?s reference document. when possible, legal responses to questions are pro- vided (in parentheses). entering values other than the given responses may cause ?error? to appear for the corresponding variable value in column h (typi- cally). in this case, the excel error ?#value!? is displayed in the corresponding cfg register in the cfg block tab. general configuration click on the general confi guration tab and start by entering the operating voltage (vdd) as 5.0 or 3.3. if you are using an external crystal or other clock source (recommended), enter its frequency. the op- erating voltage and crystal frequency affect the cur- rent drawn by the ic-tw8, which is calculated and shown for reference. the signal path clock frequen- cy ( fcore )?which affects the maximum encoder speed and the filter response?is shown for refer- ence. in general, use the highest possible frequency unless there is a need to minimize current. if you are not using an external oscillator or clock source, enter the desired clock divider and clock tuning value for the internal oscillator. figure 18: internal oscillator configuration the nominal frequency of the internal oscillator, shown for reference, depends on the operating volt- age. the actual frequency, however, varies from unit to unit and over temperature. to compensate for this, the oscillator frequency may be reduced by a factor of 2 or 4 using the clock divider and also tuned (raised) using the clock tuning value (see page 33). for initial configuration, enter the desired divider and a tuning value of 0. the resulting signal path clock frequency ( fcore ) is shown for reference. changing the clock tuning value changes the nom- inal calculated fcore . the actual fcore in any given chip with the given clock tuning value will vary from the nominal calculated value due to normal production tolerances. internal oscillator clock divider clock tuning value fcore
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc17/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary the ic-tw8 can be configured to use pull-up and pull-down resistors on the sensor sin/cos inputs to enhance fault detection in the event of a floating sensor input. figure 19: input pull-up resistors when input pull-ups are used and if a sensor input becomes disconnected, that input is immediately pulled to a level that causes an adc fault (see page 9). if the ic-tw8 wp (write protect) output (pin 29) is connected to the eeprom wp input (see connect- ing the eeprom on page 12), then the eeprom can be configured to be locked (protected) or un- locked during operation. usually the eeprom should be locked during operation. to temporarily unlock the eeprom to store configuration and cal- ibration data, disable eeprom write protection in the miscellaneous pane of the settings tab in the ic- w8 gui software or set the unlock eeprom bit in the rb_test1 register in the rb block of internal memory using serial port commands (see program- mer?s reference). next, enter the desired output mode. ab is the usu- al setting and configures the ic-tw8 to produce industry-standard ab quadrature outputs. serial and pwm are alternate output modes that are described on pages 30 and 31. ab startup mode determines how the ab outputs behave when power is applied to the ic-tw8. figure 20: ab startup mode in relative startup mode, the a and b outputs are low on startup regardless of the sensor input posi- tion (angle). in same phase startup mode, the phase relationship of the a, b, and z outputs is the same after every startup as long as the post-ab divider is not used and the actual interpolation factor, inter , is an integer. absolute burst startup mode is like same phase, except that the sensor position (angle) within one input cycle is counted out on the a and b out- puts at startup. same phase startup mode is the usual selection and provides operation similar to that of a non-interpolated encoder. enter the desired counting direction (phase rela- tionship) for the ab outputs when sensor angle is increasing. while it may be impossible to predict the correct value during design, the counting direc- tion can always be changed during testing to ensure correct phasing. enter the desired amount of time for the ic-tw8 to wait during startup for its analog circuitry to settle (see startup on page 14). the design tool returns the closest possible (actual) startup delay using the cur- rent crystal frequency. the clock (pin 6) and frame (pin 8) outputs can be activated if necessar y for special applications (see using pwm output mode on page 31). in most cases, disable the clock and frame outputs. avdd sin+ sin? cos+ cos? ic-tw8 avss 2x 2m ? 2x 2m ? outa outb relative ab startup outz outa outb outz outa outb outz startup same phase ab startup burst ab startup
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc18/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary ab configuration in the ab configuration tab, enter the input resolu- tion produced by the wheel or magnet and sensor. this value should be the number of sin/cos cycles per mechanical revolution of the wheel, magnet, or optical disc produced by th e sensor connected to the ic-tw8. next enter the desired output resolution of the encoder as the number of ab cycles per revolu- tion (cpr). this is also sometimes called ppr (pulses per revolution) and is equivalent to the num- ber of ?lines? in a non-interpolated optical encoder. with these values entered, the design tool calculates and displays the minimum required ic-tw8 inter- polation factor, the minimum post-ab divider, and the effective overall interpolation factor. in most applications, the post-ab divider is not required, and the minimum divider value should be 1. in general, this will be true if the desired output reso- lution is an integer multiple of the input resolution. specifically, minimum divider = 1 if 4 ? 4 ? desired output resolution input resolution ? 16, 384 and 4 ? desired output resolution input resolution is an integer. for example, with an input resolution of 32 sin/cos cycles per revolution, a desired output resolution of 16,384 cpr results in a minimum interpolation fac- tor of 512 and a minimum divider of 1 since 4 ? 16,384 32 ? 2048 in this case enter 1 for the divider override factor and then actual interpolation = effective interpola- tion = minimum interpolation and actual output res- olution = desired output resolution. this is the usual case. if it is desired to achieve the same output resolution using an input resolution of 24 cycles per revolu- tion, however, a minimum interpolation of 2048 and a minimum divider of 3 are required since 4 ? 16,384 24 ? 2730.66 if minimum divider 1, it is not possible to syn- chronize the z output with the states of the a and b outputs. see using the post-ab divider on page 32. impossible combinations of input and output resolu- tion are flagged with red warnings. next, enter the desired maximum speed (speed lim- it) for the encoder in rp m. the spreadsheet calcu- lates and displays the closest actual speed limit that can be implemented for the chosen output resolution using the current crystal. the calculated actual speed limit is shown in rpm, ab channel frequen- cy, ab edge frequency, and as minimum time be- tween edges. exceeding the actual speed limit can be configured to activate the fault output (pin 20). see fault configuration on page 22 for more information. for an enclosed encoder the maximum speed is usu- ally dictated by the bearings used. for a modular encoder (without bearings) or to use the full speed capability of the ic-tw8, enter an arbitrarily large value (such as 1,000,000 rpm) and the design tool will default to the highest possible speed. the calcu- lated actual speed limit is affected by the crystal frequency and output resolution. next, enter the desired maximum adaption speed in rpm. this is the speed above which auto adaption of the ab signal path parameters ceases. the actual maximum adaption speed depends on the input reso- lution and crystal frequency. in general, set the de- sired maximum adaption speed to an arbitrarily high value (such as 1,000,000 rpm) to enable auto adap- tion at all speeds. see auto adaption configuration on page 21 for more information. the warning fault speed depends on crystal fre- quency and input resolution and can be configured to activate the fault output. the warning fault speed is always half the fatal fault speed. the fatal fault speed is the ultimate speed limit of the ic-tw8 at the selected input resolution using the current crystal. exceeding the fatal fault speed always acti- vates the fault output. see fault configuration on page 22 for more information.
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc19/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary the design tool shows th e resulting speed/resolution performance in a chart at columns m ? t. the x (resolution) axis shows the range of output resolu- tions that are possible using the selected input reso- lution. the chart shows the resulting maximum speed, maximum adaption speed, warning fault speed and fatal fault speed at a given output resolu- tion. finally, enter the desired hysteresis in equivalent ab output edges to prevent output dithering at standstill. the design tool calculates and displays the closest possible (actual) hysteresis with the cur- rent input and output resolution. also displayed is the equivalent hysteresis in ab output cycles, me- chanical degrees (m) and arc-minutes of rotation, and input sin/cos cycle degrees. desired hysteresis can be less than 1 ab output edge. for best accura- cy, choose the smallest value that produces stable ab outputs with no sensor motion. experimentation may be required to determine the optimal value. the complete range of output resolutions using the selected input resolution is shown numerically in cells b39 ? b41. a complete list of output resolu- tions and the corresponding interpolation factor re- quired to achieve them is shown in the all resolu- tions tab for easy reference with respect to complet- ed designs. for example, with an input resolution of 32 cycles per revolution, an output resolution of 16,384 cpr requires an interpolation factor of 512, as shown previously. using this same input resolu- tion, the all resolution tab shows that an output resolution of 10,000 is also possible by choosing an interpolation factor of 312.50 (row 1257). filter configuration in the filter configuration tab, enter the desired fil- ter mode for the ab signal path filter and then enter one of the recommended filter instances. the design tool confirms the actual filter mode and approximate noise and jitter bandwidth for the selected filter in- stance at the current crystal frequency. if ?not de- fined? appears for the actual filter mode, the entered instance is not one of the recommended ones. non- recommended instances may cause unstable filter response. see filter on page 6 for details on filter modes and instances. the following filter modes are available. ic-tw8 filter modes mode description p low-pass filter with lag. pi critically-damped low-pass filter with no filter lag. lag recovery under-damped low-pass filter with no filter lag and reduced latency lag. p mode is the simplest mode; position lag at con- stant sensor input velocity is directly proportional to the sensor velocity and the filter instance value. there is no position or speed overshoot in p mode. pi mode eliminates filter lag at constant sensor in- put velocity at the expense of critically damped fil- ter response. in pi mode, filter lag at constant veloc- ity is eliminated, but position and speed overshoot are proportional to the filter instance value. lag recovery mode redu ces latency-induced posi- tion lag at constant sensor input velocity at the ex- pense of under-damped filter response. in lag recov- ery mode, position lag at constant velocity due to interpolator latency is reduced, but filter response is under-damped and position and speed overshoot are proportional to the filter instance value. in general, use the lowest instance value for the de- sired filter type. this gives the fastest response, minimum lag, and minimum position and speed overshoot. another instance may be used if addi- tional noise and jitter filtering is required. the design tool shows the encoder lag in ab edges per krpm and mechanical degrees (m) of encoder rotation at the chosen maximum speed for the se- lected filter instance. for a given filter instance, lag is directly proportional to encoder speed.
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc20/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary the design tool also shows the position and speed overshoot resulting from the selected filter instance. position overshoot (shown in ab edges and me- chanical degrees of encoder rotation) is proportional to the entered maximum acceleration and is typical- ly noticed on stopping (deceleration). at low accel- eration values and/or low encoder resolutions, posi- tion overshoot may be less than one ab edge and thus totally undetectable during encoder operation. speed overshoot is calculated as a percent of speed. the actual amount of speed overshoot in rpm is proportional to encoder speed. speed overshoot is typically noticed at the end of the acceleration ramp (the beginning of the constant velocity portion of the motion profile). performance graphs of enc oder lag in ab edges and response to a trapezoidal motion profile with con- stant acceleration, velocity, and deceleration are shown to allow observing the effect of the different filter instances. scroll to th e right on small computer screens to see the performance graphs. a single parameter (maximum acceleration) is used to generate the filter response graphs. enter a value in radians per second 2 that represents the maximum expected acceleration of the encoder. the design tool calculates the equivalent acceleration in units of krpm (1000 rpm) per second and time to reach the chosen maximum speed, which may be more easily understood. the acceleration value is used only to generate the performance graphs, it does not affect the configuration of the ic-tw8. the motion profile is generated by accelerating for 1000 adc samples at the entered acceleration, running at the attained speed for 1000 adc samples, and decelerating at the entered acceleration for 1000 adc samples. the maximum acceleration ( ? m ) of a motor in radi- ans per second 2 may be calculated knowing its stall torque ( t s ) in newtons and its rotor inertia ( j r ) in kilogram seconds 2 using the formula ? m ? t s j r . for example, the maxon ec 90 flat 90w motor with the 24v winding (order number 323772) has a rotor inertia of 3,060 gcm 2 and a stall torque of 4,670 mnm. thus its no-load maximum acceleration in radians per second 2 is ? m ? t s j r ? 4670 3060 ? 10, 000 ? 15, 261 using this value for the maximum acceleration pa- rameter in the design tool will then show the per- formance of the ic-tw8 wh en used in an encoder for feedback with this motor. the graphs below show typical motion profile per- formance and encoder lag of the ic-tw8 using lag recovery filter mode instance 89 at 15,261 radians per second 2 maximum acceleration. figure 21: typical encoder performance graphs
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc21/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary z configuration in the z configuration tab, enter yes or no as to whether an index sensor is connected to the zero+ and zero? inputs. if an index sensor is not used, the zero inputs of the ic-tw8 should be connect- ed to avdd and avss as explained on page 13 and the remaining entries on this sheet can be ig- nored. not using an index sensor allows higher speeds with high interpolation factors. if an index sensor is used, enter the desired width of the z output pulse in ab edges. the actual z output pulse width is confirmed; it is always equal to the desired width unless the post-ab divider is used (see page 32) or a fractional desired width is en- tered. the design tool shows the equivalent z output pulse width in ab output cycles, mechanical de- grees of rotation (m), arc-minutes of rotation, pre- divider edges, and sensor input cycle degrees for reference. next, enter the desired polarity for the z output as either active high or active low. if the post-ab di- vider is not used and the actual interpolation factor, inter , is an integer, the states of the a and b outputs at the beginning of the z output ( zpos ) can be en- tered to specify the desired synchronization of the a, b, and z outputs. set both the z position ( zpos ) and desired zero threshold to 0 initially. proper values for these pa- rameters are determined when the z signal path is calibrated (see page 26). finally, configure the ic-tw8?s internal 32-bit po- sition counter to be reset to 0 by the z output, the zero input, or not at all. if ?on zpos? is selected, the counter is reset at zpos whenever the zero in- put is active. if ?on zero? is selected, the counter is reset?and stays reset?whenever the zero in- put is active. auto adaption configuration in the auto adaption configuration tab, select which parameters are automatically adjusted (adapted) during operation to maintain low interpo- lation error and jitter. analog gain, analog offset, digital offset, digital gain match, and phase may be individually selected although there are certain de- pendencies that cause the design tool to override the entered selections. in this case, a red warning is dis- played by the design tool. it is recommended to disable analog gain and offset adaption and enable only digital offset, gain match, and phase adaption during operation. in this case, analog gain and offset remain at their calibrated set- tings during operation. this prevents changes in an- alog gain and offset (which can be quite large) from causing disturbances in the interpolated output dur- ing operation. analog gain and offset adaption may be enabled if large cha nges in sensor signal ampli- tude or offset are expected during operation. if digital offset adaption is enabled, enter the desired digital offset tolerance and the design tool confirms the closest actual tolerance that can be achieved. digital offset tolerance is the amount of un- corrected offset that the ic-tw8 tolerates before auto adaption corrects it. small tolerance values must be used for highest accuracy, but also cause offset corrections to occur more frequently during operation and thus may lead to increased output jit- ter. digital offsets of less than the entered tolerance are not corrected. in general, set the digital offset tolerance to the smallest value that prevents dither- ing of the digital offset correction value during nor- mal operation. if digital gain match adaption is enabled, enter the desired digital gain match tolerance and the design tool confirms the closest actual tolerance that can be achieved. digital gain match tolerance is the amount of un-corrected gain mismatch between the sensor sin and cos channels that the ic-tw8 tolerates be- fore auto adaption corrects it. small tolerance values must be used for highest accuracy, but also cause gain corrections to occur more frequently during operation and may lead to increased output jitter. digital gain mismatch of less than the entered toler- ance is not corrected. in general, set the digital gain match tolerance to the sma llest value that prevents dithering of the digital gain match correction value during normal operation.
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc22/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary the correction configuration controls how the auto adaption corrections are applied to the ab signal path parameters during oper ation. first, select linear or exponential correction mode. linear correction mode is the recommended selection and provides the smoothest correction; parameter corrections are applied one increment per correction cycle. this results in the least disturbance to the interpolator output when the auto adap tion corrections are made. faster correction is available in exponential correc- tion mode which allows selection of the desired cor- rection step size. small correction steps correct 25% of the parameter error every correction cycle; medi- um correction steps correct 50% of the parameter error every correction cycle; large correction steps correct 75% of the parameter error every correction cycle. experimentation may be required to deter- mine the optimal correction configuration. the correction timebase determines the rate at which auto adaption corrections are applied. in gen- eral, enter 0 for the desired correction timebase and the design tool confirms the closest possible actual timebase using the current crystal. this results in auto adaption corrections being applied as quickly as possible. larger timebase values provide slower response. lastly, select whether or not the auto adapted pa- rameter values are written to the eeprom during operation (auto store) and used at the next restart. if auto store is enabled, ente r the desired digital offset and gain match thresholds; the design tool confirms the closest available (actual) values. these thresh- olds are the levels of change in the respective pa- rameters that must be achieved by auto adaption to cause new values to be written to eeprom. since most eeproms are only guaranteed for a finite number of write cycles, these thresholds must be set high enough to minimize unnecessary eeprom writes. if auto store is disabled, these thresholds are ignored. fault pin configuration in the fault pin configuration tab, select whether the fault output (pin 20) is active high or active low. active low is the recommended since this is the startup default of the ic-tw8. if active high is cho- sen, the fault output will be active (high) at startup until configured to active low polarity during the startup process. the fault output can be configured to stay active for a time after a fault condition has cleared to en- hance observation of transient fault conditions. the amount of time by which the output is prolonged is fixed and inversely proportional to crystal frequen- cy. next, choose whether or not the ab outputs should be stopped when the fault output is ac- tive. ic-tw8 fault conditions can be configured to either activate or latch the fault output. faults which do not latch the fault output only activate the fault output for the time during which the condi- tion is active (subject to prolonging, as explained above). faults which latch the fault output are cleared at restart or may be cleared by writing to the stat_sp, stat_ee, or flt_stat registers us- ing one of the serial ports (see programmer?s refer- ence). a crystal fault is active if the ic-tw8 is configured to use an external crystal or clock source (see page 16) and the expected external signal is not present. in this case, the ic-tw8 reverts to using its internal oscillator. once an external clock signal becomes available, the ic-tw8 switches back to using the external oscillator and clears the crystal fault. clear- ing the crystal fault also de-activates the fault output if the crystal fault is not configured to latch. an eeprom fault is active if the eeprom has not been initialized, there is a hardware or communica- tion problem with the eeprom, or if any of the internal checksums are invalid. it is recommended to latch eeprom faults as they can result in un- defined startup conditions. a fatal operational fault is active if the instantane- ous sensor input velocity is greater than the fatal fault speed shown on the ab configuration tab (see page 18), the filter lag is too large (see page 19), or the ab output is more than half an input cycle be- hind the sensor input position due to prolonged op-
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc23/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary eration above the maximum speed shown on the ab configuration tab (see page 18). it is recommended to configure fatal operati onal faults to latch the fault output as they can result in erroneous inter- polator output. an operational warning is active if the instantaneous sensor input velocity is greater than the maximum speed or warning fault speed shown on the ab con- figuration tab (see page 18). interpolator output is still correct while an operational warning is active. maximum speed is determined by the desired speed limit (see page 18) while the warning fault speed is always half the fatal fault speed. if operational warnings are treated as faults, they can be config- ured to activate or latch the fault output. if op- erational warnings are not treated as faults, they are ignored. it is recommended to configure operational warnings to be treated as faults but not to latch the fault output so that the fault output is de- activated when the condition is resolved. an adc fault is active if the signal input level to the analog-to-digital converters in the ab signal path (see page 5) is outside defined operational lim- its. the upper signal level (called adc overflow) is fixed at 1.5v, which is 106% of the nominal signal level into the adc. the lower signal level (called adc underflow) can be set between 10% and 100% of nominal signal level or left at the default (10%). enter the desired adc underflow level and the design tool confirms the closest possible (actual) level. less resolution for the adc underflow level is available if the adc quality monitor is used (see page 23). adc overflow and underflow faults are not fatal, but interpolation accuracy is reduced when operat- ing under these conditions. therefore, it is recom- mended not to latch adc faults, but to stop auto adaption when an adc fault is active. this prevents auto adaption from overcompensating for an out-of- range input signal and de-activates the fault out- put when the input signal is back in range. if adaption faults are used, enter the desired maxi- mum adaption values for offset, gain match, and phase. the design tool confirms the closest possible (actual) values. when any of these levels is exceed- ed, adaption of the corresponding parameter stops and an adaption fault is activated (see page 21). less resolution for the adaption limits is available if the adaption quality monitor is also used (see page 24). if adaption faults are not used, the design tool sets the adaption limits to their highest possible (actual) values to avoid ever stopping auto adaption. since an adaption fault always latches the fault output and stops auto adaption if adaption faults are used, it is recommended not to use adaption faults without precise knowledge of how the parameters adapt un- der all operating conditions . adaption faults are cleared at restart when valid startup values for the parameters are read from the eeprom. finally, the design tool summarizes the conditions that activate the fault output, the conditions that latch the fault output, and the conditions that are ignored. latched faults are cleared by restarting the ic-tw8 or by writing to the stat_sp, stat_ee, or flt_stat registers using one of the serial ports (see programmer?s reference). adc quality monitor if set adc underflow? = no in the fault pin configuration tab, the adc quality monitor tab can be ignored in its entirety. if set adc underflow? = yes in the fault pin configuration tab, use the adc quality monitor tab to enable or disable the adc quality monitor. if the adc quality monitor is not used, the remainder of the adc quality monitor tab may be ignored. if the adc quality monitor is used, enter the desired adc quality threshold level. this is the adc level in percent of nominal signal input amplitude that is considered to be the boundary between acceptable and marginal signal level for the application. the design tool shows the closest possible (actual) adc quality threshold level a nd the desired and actual adc underflow fault levels from the fault pin configuration tab. in operation, the ic-tw8 continuously calculates the variable qm_adc as a value between 0 (adc level > adc quality threshold) and 255 (adc level adc underflow level). between the quality threshold level and the underflow level, qm_adc is inversely proportional to the adc level as shown in the design tool graph. thus, qm_adc indicates the relative quality (signal amplitude) of the input signal. qm_adc is a component of the pwm sig- nal that drives the status output (pin 19) for ex-
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc24/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary ternal quality monitoring; it may also be read direct- ly from the var block in internal memory via the serial ports (see programmer?s reference). adaption quality monitor if use adaption faults? = no in the fault pin configuration tab, the adaption quality monitor tab can be ignored in its entirety. if use adaption faults? = yes in the fault pin configuration tab, use the adaption quality monitor tab to enable or disable the adaption quality monitor. if the adaption quality monitor is not used, the remainder of the adaption quality monitor tab may be ignored. if the adaption quality monitor is used, enter the de- sired offset, gain match, and phase adaption quality threshold levels. these levels are the cumulative amount of adaption that is considered to be the boundary between acceptable and marginal opera- tion for the application. the design tool shows the closest possible (actual) quality threshold levels and the desired and actual fault levels from the fault pin configuration tab. in operation, the ic-tw8 continuously calculates the variable qm_adapt as qm_adapt ? mof f s ? mof f c ? mgai n ? mphase where moffs , moffc , mgain , and mphase are values between 0 (total adaption < adaption quality thresh- old) and 255 (total adaption adaption quality threshold) of the sin channel offset, cos channel offset, gain match, and phase adaption quality moni- tors respectively. between the quality threshold lev- el and the fault level, moffs , moffc , mgain , and mphase are proportional to the total cumulative amount of adaption of the respective parameter as shown in the design tool graphs. qm_adapt is the sum of these four values and thus indicates the relative quality (amount) of pa- rameter adaption. qm_adapt is a component of the pwm signal that drives the status output (pin 19) for external quality monitoring; it may also be read directly from the var block in internal memory via the serial ports (see programmer?s ref- erence). when qm_adapt reaches 255, an adap- tion fault is activated. status pin configuration if neither the adc quality monitor nor the adaption quality monitor is used, the status pin configu- ration tab may be ignored in its entirety. if either of the quality monitors is used, use the status pin configuration tab to set the polarity and mode of the status output (pin 19). the status output is a pulse-width modulated signal whose duty cycle is proportional to the out- puts of the enabled quality monitors. pwm polarity determines whether the duty cycle increases of de- creases for an increasing value from the quality monitors while pwm mode determines whether the status output response is linear or logarithmic. logarithmic mode is useful when driving an led from the status output so that the intensity or color is proportional to the pwm duty cycle. the design tool graph shows the configured response. lut configuration the sensor distortion lookup table (lut) can be enabled or disabled in the lut configuration tab. if the lut is not used, the remainder of the lut con- figuration tab may be ignored. see using the lut on page 34 for information on configuring the lut. cfg block the cfg block tab shows the complete ic-tw8 configuration (as determined by the preceding tabs) as stored in the cfg block in internal memory (see programmer?s reference). cfg block register val- ues are shown in decimal, hexadecimal, and binary as a reference for troubleshooting. gui hex the gui hex tab shows the complete ic-tw8 con- figuration (as determined by the preceding tabs) in the format used by the graphical user interface software hex editor. after using the design tool to configure the ic-tw8, type these values into the corresponding address locations in the gui hex ed- itor tab to transfer the configuration to the actual device.
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc25/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary auto calibration once the ic-tw8 has been configured, the signal path must be calibrated to determine proper values for gain, offset correction, gain match, and phase correction. this is most easily done using the auto calibration feature of the ic-tw8 to automatically determine optimum values for these parameters. al- ternatively, initial parameter values may be written to the parameter registers using the serial interface and allowed to adapt. the adapted parameter values must then be written to the eeprom for use after subsequent startups. auto calibration is initiated by pulling calib (pin 5) to dvss. a pushbutton switch connected be- tween calib and circuit ground (as shown in fig- ure 8 on page 10) is an easy way to achieve this in series production. with calib held low, provide sensor input of a few hundred sin/cos cycles and the ic-tw8 ?tunes? the analog gain, analog offset correction, digital offset correction, digital gain match, and digital phase correction parameters to provide lowest error and jitter in the interpolated ab outputs. the sensor input used for auto-calibration does not need to be at a constant frequency nor must it be unidirectional. a rotary encoder can be calibrated by moving the disc or wheel back and forth by a few revolutions; a linear encoder by moving the sensor back and forth on the scale by a few centimeters. after providing sufficient input signals, release the calib input (it is pulled high by an internal pull-up resistor) and the ic-tw8 immediately stores all cal- ibration parameters in the external eeprom. these auto-calibrated values are th en used for subsequent startups (see page 15).
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc26/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary calibrating the z signal path the z signal path must be calibrated to generate a z output pulse at the proper location within a sensor input cycle and that is properly synchronized to the ab outputs. the z output is configured using the design tool, but the z signal path must be calibrated manually, if required. when the post-ab divider is not used and the interpolation factor, inter , is an in- teger, once the z signal path is calibrated, one and only one z output pulse, aligned as desired with the a and b outputs, is produced per revolution. for example, if zwidth = 1 (edge), outa is high at zpos , and outb is low at zpos , the following output synchronization results. figure 22: abz output synchronization if the post-ab divider is used or the actual interpo- lation, inter , is not an integer (see page 18), the con- figured abz output synchronization is not main- tained at every z output. see page 27 for infor- mation on using the z output with the post-ab di- vider. in general, there are three cases, depending on the type of index sensor connected to the zero inputs of the ic-tw8: 1. no index sensor. 2. digital output index sensor. 3. analog output index sensor. these three cases each are discussed separately fol- lowing. no index sensor the simplest case is where no index sensor is used. this is useful in applications where the incremental sensor produces only one input cycle per revolution, such as with an on-axis analog hall effect device. in this case, one z output is produced for every input cycle and it is only necessary to program the desired location, length, and synchronization of the z output pulse using the design tool (see page 21). figure 23: z output with no index sensor in the design tool z configuration tab, answer ?yes? to the ?use index sensor?? question even though the zero inputs are tied to avdd and avss (see page 13) and set the desired zero threshold to 0. configure the remaining parameters as required and load the complete cfg bock to the ic-tw8 using the gui or serial port commands (see programmer?s reference). outa outb outz sin cos 360 0 sensor input angle outz zpos zwidth outa outb 1 input cycle zpos
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc27/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary digital output index sensor in applications where the incremental sensor pro- duces multiple input cycles per revolution?such as optical and mr magnetic sensors?an index sensor must be connected to the zero inputs to qualify or ?gate? the z output to ensure one and only one z output pulse per revolution. in this case, it is neces- sary to align the z output pulse with the zero input signal and to program the desired length and syn- chronization of the z output pulse using the design tool (see page 21). figure 24: z output with digital index sensor first, connect a digital output index sensor to the ic- tw8 as explained on page 13. then, in the z con- figuration tab of the design tool, set the desired zero threshold to 0, configure the remaining pa- rameters as required (see page 21), and load the complete cfg bock to the ic-tw8 using the gui or serial port commands (see programmer?s refer- ence). to calibrate zpos , it is necessary to observe both the z output and the internal z gating signal simultane- ously. to observe the internal gating signal, enable index gating test mode in the test mode pane of the settings tab in the gui or set the enable z test mode bit (ztest) in the rb_test1 register in the rb block of internal memory using serial port commands (see programmer?s reference). this forces the internal z gating signal onto outa (pin 18), as shown following, where it can be observed using an oscilloscope. figure 25: observing the z gating signal calibrate the z signal path by incrementing main_zpos (the zpos location within an input cy- cle) until the z output is centered within the z gat- ing signal, as shown in figure 24. main_zpos can be accessed using the gui or by writing to the main_zpos register in the cfg block in internal memory via the serial ports (see programmer?s ref- erence). finally, disable index gating test mode in the test mode pane of the settings tab in the gui or reset the enable z test mode bit (ztest) in the rb_test1 register and then store the updated main_zpos register value to eeprom using a write all command via one of the serial ports or the write eeprom button in the gui. in general, the synchronization of the index gating signal to the sin and cos input signals is fixed. it is determined by the physical alignment of the incre- mental and z tracks on the encoder disc or wheel and the physical alignment of the incremental and index sensors to each other. since these physical alignments cannot typically be easily adjusted, it is important that they be carefully controlled from unit to unit to allow interchangeability of encoder wheels and sensors in series production. to guarantee one and only one z output pulse per revolution, the zero input signal from the index sensor must be at least as wide as the desired width of the z output pulse and no longer than two input cycles minus the width of the z output pulse under all operating conditions. specifically, z w i dt h [ ? ] ? i n d e x w i dt h [ ? ] ? 720 ?? z w i dt h [ ? ] where indexwidth [] is the width of the index sensor signal in input cycle degrees. sin cos 360 0 sensor input angle outz zpos zwidth outa outb 1 input cycle zpos z gating signal outz internal z pulse, once per input cycle zero+ zero? delay outa
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc28/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary for example, assume it is desired to have the z out- put pulse centered within th e input cycle. in this case, zpos should be set to a nominal value of zpos [ ? ] ? 180 ?? zwi dt h [ ? ] 2 and the zero input signal must be approximately physically aligned (in-phase) with the cos? input. as shown in figure 26, the z gating signal will meet the index width requirement if its transitions fall anywhere in the gray areas of the waveform. figure 26: digital index sensor example any deviations from ideal synchronization of the index signal to the cos? signal due to production tolerances can then be co mpensated by adjusting the nominal zpos value, if necessary. analog output index sensor in applications where the incremental sensor pro- duces multiple input cycles per revolution?such as optical and mr magnetic sensors?an index sensor must be connected to the zero inputs to qualify or ?gate? the z output to ensure one and only one z output pulse per revolution. in this case, it is neces- sary to set the switching threshold of the z signal path comparator, align the z output pulse with the z gating signal, and program the desired length and synchronization of the z output pulse using the de- sign tool (see page 21). figure 27: z output with analog index sensor first, connect an analog output index sensor to the ic-tw8 as explained on page 13. then, in the z configuration tab of the design tool, set the initial desired zero threshold to 0, configure the re- maining parameters as re quired (see page 21), and load the complete cfg bock to the ic-tw8 using the gui or serial port commands. to calibrate the zero threshold level, it is neces- sary to observe the internal z gating signal. to ob- serve the internal gating signal, enable index gating test mode in the test mode pane of the settings tab in the gui or set the enable z test mode bit (ztest) in the rb_test1 register in the rb block of inter- nal memory using serial port commands (see pro- sin cos outz 1 input cycle zpos z gating signal 90 180 270 0 360 internal z pulse zwidth sin cos 360 0 sensor input angle outz zpos zwidth outa outb 1 input cycle zpos z gating signal
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc29/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary grammer?s reference). this forces the internal z gating signal onto outa (pin 18), as shown follow- ing, where it can be observed using an oscilloscope. figure 28: observing the z gating signal set the z comparator switching threshold, zth , by adjusting the value of main_z.th to produce a sin- gle pulse at the z gating signal output (outa) as shown. figure 29: setting the z comparator threshold variable main_z.th can be accessed using the gui or by writing to the main_z register in the cfg block in internal memory via the serial ports (see programmer?s reference). analog sensors often have side lobes on their output signals as shown in figure 29. it is important that these side lobes not cross the comparator threshold under any operating condition otherwise multiple z outputs may result. the z comparator switching threshold, zth , has a range of 300mv in 20mv steps (see figure 28). however, since the zero input amplifier has a fixed gain of 8, the actual switching threshold range referenced to the zero input signal level is 37.5mv in steps of 2.5mv. to calibrate zpos , it is necessary to observe both the z output and the internal z gating signal simultane- ously. calibrate zpos by incrementing main_zpos (the zpos location within an input cycle) until the z output is centered within the z gating signal, as shown in figure 27. main_zpos can be accessed using the gui or by writing to the main_zpos register in the cfg block in internal memory via the serial ports (see programmer?s reference). finally, disable index gating test mode in the test mode pane of the settings tab in the gui or reset the ena- ble z test mode bit (ztest) in the rb_test1 regis- ter and then store the updated main_zpos register value to eeprom using a write all command via one of the serial ports or the write eeprom button in the gui. in general, the synchronization the of analog index sensor signal to the sin and cos input signals is fixed. it is determined by the physical alignment of the incremental and z tracks on the encoder disc or wheel and the physical alignment of the incremental and index sensors to each other. since these physi- cal alignments cannot typically be easily adjusted, it is important that they be carefully controlled from unit to unit to allow interchangeability of encoder wheels and sensors in series production. to guarantee one and only one z output pulse per revolution, the width of z gating signal as set by zth must be at least as wide as the desired width of the z output pulse and no longer than two input cycles minus the width of the z output pulse under all op- erating conditions. specifically, z w i dt h [ ? ] ? i n d e x w i dt h [ ? ] ? 720 ?? z w i dt h [ ? ] where indexwidth [] is the width of the z gating signal in input cycle degrees. outz internal z pulse, once per input cycle zero+ zero? delay outa zth z gating signal a nalog index sensor signal zth
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc30/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary for example, assume it is desired to have the z out- put pulse centered within th e input cycle. in this case, zpos should be set to a nominal value of zpos [ ? ] ? 180 ?? zwi dt h [ ? ] 2 and the analog index sensor signal must be roughly in-phase with the cos? input. as shown in figure 30, the z gating signal will meet the index width requirement if its transitions fall anywhere in the gray areas of the waveform. figure 30: analog index sensor example any deviations from ideal synchronization of the index signal to the cos? signal due to production tolerances can then be co mpensated by adjusting the nominal zpos value, if necessary. using serial-only output mode the ic-tw8 contains a 32-bit sensor position (an- gle) counter that can be accessed through either of the serial ports. instantaneous sensor velocity can also be accessed via the serial ports. while the serial ports can be used to read position and velocity in all output modes, serial-only output mode removes the maximum ab output frequency limit, fab , allowing higher sensor speeds. enter serial for the output mode in the general configuration tab of the design tool and the a, b, and z outputs are disabled. serial-only output mode is not explicitly handled in the design tool, although the design tool may still be used for ic-tw8 configuration. see the ic-tw8 programmer?s reference for information on the se- rial ports, the 32-bit position variable pos, and the sensor velocity variable vel in the wm block in internal memory. zwidth sin cos outz 1 input cycle zpos z gating signal 90 180 270 0 360 internal z pulse zth analog index sensor signal
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc31/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary using pwm output mode as an alternative to the standard ab quadrature out- put, the ic-tw8 can provide a pulse-width modu- lated (pwm) output proportional to sensor angle. this is useful as a direct digital interface between the interpolator and a subsequent microcontroller or fpga in imbedded control applications. enter pwm for the output mode in the general configu- ration tab of the design tool. the a and b outputs (pins 18 and 17 respectively) become the differen- tial pwm output; the z output (pin 16) remains un- changed. figure 31: pwm output mode selecting pwm output mode in the design tool re- veals the pwm configuration selections. enter the desired frequency for the pwm output; the design tool shows the closest actual frequency available using the selected crystal. finally, select whether the pwm output is clamped or not. figure 32: pwm output clamp the typical configuration is not clamped, in which case the pwm output duty cycle represents the an- gle of the sensor sin/cos inputs over multiple input cycles. the clamped configuration is useful for sin- gle-turn absolute applications where there is only one sin/cos input cycle per revolution. an external first or second order low-pass filter can be used to convert the pwm output to a voltage, which in turn can be sampled by an adc. since the pwm output is generated by a first order delta- sigma modulator (dsm), a second order filter is recommended. however, a first order analog rc filter may be sufficient in simple applications. figure 33: analog low-pass pwm filter alternatively, the pwm output can be directly sam- pled and digitally filtered by a microcontroller. fpga, or pld. in this case, enable the clock and frame outputs in the general configuration tab of the design tool. the clock output (pin 6) can then be used to synchronously sample the pwm output. figure 34: digitally sampling the pwm output this allows an all-digital decimation filter to be im- plemented. since a first order dsm is used to gen- erate the pwm output, a second order restructuring filter is required for best signal-to-noise perfor- mance. as with the analog filter, however, a first order filter may be sufficient for many applications. pwm+ pwm? outz ic-tw8 outa outb outz sin cos 1 input cycle pwm output (not clamped) 90 180 270 0 360 100% 0% pwm output (clamped) 100% 0% adc microcontroller with built-in adc r c ic-tw8 outa outb outz gp input gp input microcontroller, fpga, or pld ic-tw8 outa clock outz
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc32/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary using the post-ab divider the ic-tw8 includes an optional divider after the internal ab output generation that can be used to reduce (divide) the configured resolution by a factor of 1?32. this post-ab divider is useful when the desired output resolution is not an integer multiple of the input resolution. figure 35: post-ab divider when using the rotary encoder design tool to con- figure the ic-tw8, the post-ab divider is automati- cally enabled if necessary. the ab configuration tab in the design tool calculates the minimum divid- er necessary to achieve the desired output resolution using the configured input resolution. this mini- mum value may be overridden if necessary by enter- ing a divider override factor. as shown in figure 35, the z output bypasses the post-ab divider. therefore, any configured syn- chronization of the z output to the a and b outputs is lost when using the post-ab divider. for example, with an input resolution of 24 sin/cos cycles per revolution, it is impossible to achieve an output resolution of 16,384 ab cycles per revolu- tion (cpr) without the post-ab divider since 4 ? 16384 24 is not an integer (see page 18). how- ever, entering these values into the design tool gives a minimum divider value of 3 and an effective in- terpolation, intereff , of 682.66667. thus, an output resolution of 16,384 cpr is possible with an input resolution of 24 by using the post-ab divider. note that the maximum speed and maximum adap- tion speed are inversely proportional to the post-ab divider value. higher post-ab divider values pro- duce lower maximum spee d and maximum adaption speed. these speed values are shown in the ab configuration tab of the design tool. the post-ab divider is also useful to allow a com- plete range of output resolutions to be achieved us- ing a single input resolution. for example, with an input resolution of 128 sin/cos cycles per revolu- tion, only binary output resolutions can be achieved without using the post-ab divider. as shown in cell b49 of the ab configuration tab of the design tool, resolutions between 128 and 2,097,152 cpr in in- crements of 32 cpr can be achieved with this con- figuration. the actual resolutions available in this configuration (128, 160, 192, 224, 256, etc.) are shown in the all resolutions tab in the design tool. entering a divider override factor of 16 in this con- figuration provides an actual divider of 16 and re- duces the resolution increment to 2 cpr. now, all even resolutions between 8 and 131,072 cpr may be achieved. increasing the divider override factor to 32 allows all integer resolutions (4, 5, 6, 7, 8, etc.) between 4 and 65,536 to be achieved using an input resolution of 128 sin/cos cycles per revolu- tion. post-ab divider ab generator outa outb divide by 2 shown. outz
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc33/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary tuning the internal oscillator the ic-tw8?s internal oscillator has a nominal fre- quency of 20 mhz with 5v supplies and 16 mhz with 3.3v supplies. however, manufacturing toler- ances and changes in temperature can cause large variations in the actual internal oscillator frequency of any given device. the clock tuning value in the main_clock.freq variable allows tuning the frequency of the internal oscillator. in addition, the clock divider value in the main_clock.div variable allows dividing the oscillator frequency by 1, 2, or 4. these two param- eters allow setting the internal oscillator of any spe- cific device to the desired frequency. the main_clock register can be accessed using the serial ports (see programmer? s reference) or via the settings tab in the gui. to observe the internal oscillator output, enable in- ternal oscillator test mode in the test mode pane of the settings tab in the gui or set the enable clock test mode bit (adctest) in the rb_test1 register in the rb block of internal memory using serial port commands (see programmer?s refer- ence). this forces fcore /2 onto the frame output (pin 8), as shown below, where it can be observed using an oscilloscope or a frequency counter. figure 36: internal oscillator tuning first, set the clock divider to the desired value, usu- ally 1 (main_clock.div = 3), and the clock tun- ing value to its lowest value (main_clock.freq = 0). increment the clock tuning value until the de- sired oscillator frequency is obtained, remembering that the output frequency on the frame pin is half the actual oscillator frequency. finally, disable in- ternal oscillator test mode in the test mode pane of the settings tab in the gui or reset the enable clock test mode bit (adctest) in the rb_test1 register and then store the updated main_clock register value to eeprom using a write all com- mand via one of the serial ports or the write eeprom button in the gui. typical internal oscillator frequency of the ic-tw8 with 5v supplies and a clock divider of 1 at room temperature (20c) is shown below. other clock divider values produce appropriately scaled-down frequencies. typical internal oscillator frequency clock tuning value frame output frequency [mhz] fcore frequency [mhz] 0 10.6 21.2 1 11.0 22.0 2 11.5 23.0 3 11.9 23.8 4 12.5 25.0 5 13.0 26.0 6 13.6 27.2 7 14.3 28.6 8 15.1 30.2 9 15.8 31.6 10 16.8 33.6 11 17.7 35.4 12 18.9 37.8 13 20.2 40.4 14 21.6 43.2 15 23.3 46.6 note that the nominal oscillator frequency is achieved with a clock tuning value of 0 and that the range of the clock tuning value allows setting the internal oscillator frequency above the maximum allowed for proper operation of the device (shown in red ). setting the internal oscillator frequency higher than the specified maximum may result in undefined operation. in general, set the internal oscillator frequency as close to?but not greater than?the maximum fre- quency for the supply voltage used (32 mhz at 5v, 24mhz at 3.3v). the temperature coefficient of the internal oscillator is negative, so oscillator frequen- cy decreases with rising temperature and increases with decreasing temperature. in applications where low temperature operation is expected, the room internal oscillator clock divider clock tuning value fcore main_clock.div main_clock.freq frame 2
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc34/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary temperature oscillator freque ncy should be reduced accordingly. see electrical characteristics in the ic- tw8 data sheet for the actual value of the oscilla- tor?s temperature coefficient. using the lut the ic-tw8 contains a 64-byte sensor distortion look-up table (lut) that can be used to apply an arbitrary correction function to the calculated sensor position (angle). to use the lut, the correction values must first be calculated and loaded into the table using the design tool, the gui software, or commands sent via the serial ports. then the lut must be enabled by setting adpt_cfg.lut = 1 in the cfg block in internal memory. when the lut is enabled, the maximum spi port clock frequency is reduced to fcore /4.if adpt_cfg.lut = 0, the lut is bypassed and no co rrection is applied. figure 37: sensor distortion lut the lut divides the sensor sin/cos input cycle into 64 segments of 5.625 each and the table values de- fine a 64-point piecewise linear correction curve. correction values for sensor angles within a lut table segment are linearly interpolated between the two table values on either end of the segment. in operation, the calculated correction value is added to the sensor angle. lut table values have a range of 127. the actual correction applied to the 14-bit sensor angle is 4 times the table value, giving the lut a correction range of 4 ?? 127 16384 ? 360 ??? 11.16 ? the resolution of the lut values is 4 16384 ? 360 ?? 0.088 ?? 5.3 arc minutes the simplest lut is a null table, where all values are zero. this is equivalent to bypassing the lut and applies no correction to the sensor signal, but serves as a starting point for understanding lut operation. figure 38: null lut a constant lut is one in which all the values are the same. this adds a constant phase shift to the sensor angle, shifting the 0 position left for positive lut values and right for negative values. atan lut sin cos adpt_cfg.lut 0 1 14-bit sensor position (angle) 14-bit corrected sensor position (angle) sin cos 360 0 sensor input angle 1 input cycle 360 0 lut output angle 0 127 ?127 lut values
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc35/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary figure 39: constant lut a constant lut is useful in single turn absolute ap- plications such as synchronous ac motor commuta- tion where the feedback signal must be aligned to the motor poles. for example, to shift the interpola- tor 0 position 3.8 to the right, the constant lut value is calculated as ? 3.8 360 ? 16384 4 ?? 43 more complex luts require careful fft measure- ment of sensor distortion. when sensor distortion harmonics are known, the design tool can be used to calculate a lut that corr ects for up to two sensor harmonics which are identical on both sin and cos input channels. in the lut configuration tab of the design tool, enter up to two sensor distortion harmonic to be cor- rected. the harmonic number, amplitude in percent, and phase in degrees are required. to correct for only one distortion harmonic enter 0 amplitude for the unused harmonic. the design tool shows the re- sultant angular error due to the distortion and the residual error left after correction. the residual an- gular error is due to the finite (8 bit) resolution of the lut. for example, if fft analysis of a particular sensor showed 2% second harmonic distortion at 0 phase shift and 1% third order harmonic distortion at 180 phase shift, the following angular error results. figure 40: sensor distortion the design tool shows that this sensor distortion produces peak angular error of 1.88 input cycle de- grees. after correction by the lut, 0.04 (15.76 arc minutes) of angular error remain. the gui lut tab in the design tool shown the cal- culated lut as a graph and lut values. save the gui lut tab as a .csv file for direct import into the gui software. the lut entries are also copied into the gui hex tab of the design tool. sin cos 360 0 sensor input angle 1input cycle lut output angle 0 127 ?127 lut values
ic-tw8 16-bit sin/cos interpolator serial configuration mode jan 9, 2013 page sc36/36 copyright ? 2011?2013 ic-haus http://www.ichaus.com preliminar y preliminary ic-haus expressly reserves the right to change its products and/ or specifications. an info letter gives details as to any amend ments and additions made to the relevant current specifications on our internet website www.ichaus.com/infoletter ; this letter is generated automatically and shall be sent to registered users by email. copying ? even as an excerpt ? is only permitted with ic-h aus' approval in writing and pr ecise reference to source. ic-haus does not warrant the accuracy, completeness or timeliness of the specification and does not assume liability for any er rors or omissions in these materials. the data specified is intended solely for the purpose of product de scription. no representations or warranties, either express or implied, of merchantability, fitness for a particular pur pose or of any other nature are made he reunder with respect to information/specifi cation or the products to which information refers and no guarantee with respect to compliance to the intended use is given. in particular, this also app lies to the stated possible applications or areas of applications of the product. ic-haus conveys no patent, copyright, mask work right or other trade mark right to this product. ic-haus assumes no liability f or any patent and/or other trade mark rights of a third party resulting from processing or handling of the product and/or any other use of the product. revision history date notes pages affected april 19, 2012 first release all april 30, 2012 added sections from calibrating the z signal path to end. 26?35. nov 22, 2012 formal corrections of header layout; update of disclaimer all jan 9, 2013 z output can only be synchronized to ab outputs if post-ab divider not used and inter is an integer. reference gui test modes in calibrating the z signal path and tuning the internal oscillator sections, etc. 17, 18, 21. 17, 27, 29, 33.


▲Up To Search▲   

 
Price & Availability of IC-TW8-13

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X